For some reason when I call FB.logout();
, the user does not actually get logged out of Facebook.
Why might this be? No js errors get thrown, and I can step through the code as it runs through the SDK... it just doesn't successfully log out.
For some reason when I call FB.logout();
, the user does not actually get logged out of Facebook.
Why might this be? No js errors get thrown, and I can step through the code as it runs through the SDK... it just doesn't successfully log out.
You need to have the fb-root
DIV tag first, then call FB.init()
and then FB.logout()
Example Usage:
FB.logout(function(){
window.location = 'path/url here';
});
Alternatively, you should redirect to this url logout:
www.facebook.com/logout.php?app_key=KEY&session_key=SESSION&next=REDIRECT_URL