JavaScript Log out of Application but not Facebook

The traditional method of logging out using FB.logout actually logs the user out of your application, as well as facebook.

This method expires the access token for your application only, essentially logging the user out of only your app.
window.fbAsyncInit = function() {

  FB.getLoginStatus(function(response) {

    FB.api("/me/permissions", "delete", function(response){ 


    });

  });

}
Posted by
Snippet Viewed 1809 times.

Share your JavaScript code snippets:

  • Get some recognition & a link back to your site.
  • Create your own code library.
  • Help your fellow developers, as they have helped you.

 

Submit | Browse

Most Recent javascript snippets

Most Viewed