Facebook JS SDK FB.logout() 不会终止用户会话 [英] Facebook JS SDK FB.logout() doesn't terminate user session
问题描述
我正在尝试使用 Facebook JS SDK 将用户从 Facebook 注销,但是调用:
I'm attempting to log a user out of facebook with the Facebook JS SDK, however calling:
FB.logout(function(response){
console.log(response);
});
返回:response.status ==已连接"
returns: response.status == "connected"
并且只有在刷新页面后,SDK 才意识到会话已经结束.任何人都知道可能导致这种行为的原因是什么?此代码以前在我的应用程序中有效,最近开始以这种方式运行.
And only after refreshing the page does the SDK realize that the session has ended. Anyone know what could be causing this behavior? This code previously worked in my application and has recently started behaving this way.
另一个使用 FireBug 的例子:
Another example using FireBug:
推荐答案
https://developer.facebook.com/bugs/245362365535898?browse=search_4f112135664703a96454690这是 JS SDK 中的一个错误,现已修复,应该不会太久被推送.
在此之前,您可以执行以下操作
https://developers.facebook.com/bugs/245362365535898?browse=search_4f112135664703a96454690
This is a bug in the JS SDK that has now been fixed and it should get pushed in not too long.
Until then you can do the following
FB.logout(function(response) {
FB.Auth.setAuthResponse(null, 'unknown');
...
});
这篇关于Facebook JS SDK FB.logout() 不会终止用户会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!