문제

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

다른 팁

You need to have a valid access token when you call FB.logout. Don't remove the fbs_* cookies on your own. FB.logout will do this itself.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top