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 1749 times.

Share your JavaScript code snippets:

  • Get some recognition & link back to your site.


Submit | Browse

Most Recent javascript snippets

Most Viewed