Facebook FB.ui 注销不会触发
FB.ui(
{
method: 'feed',
name: 'some text',
link: 'some text',
picture: 'aa.jpg',
caption: 'some text',
description: 'some text',
message: 'some text'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
});
}
该代码工作正常,现在我喜欢之后:
alert('Post was published.');
从 Facebook 注销,默默地 如何 ?
添加该代码 alert('postpublish')
后没有执行任何操作!
FB.ui(
{ method:'auth.logout', display:'hidden' },
function() { alert("you're logged out!"); }
);
我发现:使用“服务器端工作流程”(OAuth 2.0)登录后会引发 FB auth.logout,但不确定我是否足够理解代码以知道它执行我要求的操作!
FB.ui(
{
method: 'feed',
name: 'some text',
link: 'some text',
picture: 'aa.jpg',
caption: 'some text',
description: 'some text',
message: 'some text'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
});
}
That code WORK fine, now i like after :
alert('Post was published.');
to be logged out from facebook, silently
HOW ?
Adding that code After the alert('post publish')
did not do anything !!
FB.ui(
{ method:'auth.logout', display:'hidden' },
function() { alert("you're logged out!"); }
);
i have found : FB auth.logout is being raised after being logged in using the "server-side-workflow" (OAuth 2.0) but not sure i understand the code enough to know it do what i ask !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
https://developers.facebook.com/docs/reference/javascript /FB.getLoginStatus/
https://developers.facebook.com/docs/reference/javascript/FB.logout/
我使用评论框编写了一个示例来触发自动注销
http://shawnsspace.com/fb.logout.test.php
代码:
https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/
https://developers.facebook.com/docs/reference/javascript/FB.logout/
I wrote a sample using the comments box to fire the auto logout
http://shawnsspace.com/fb.logout.test.php
THE CODE: