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('post publish')
没有做任何事情!
FB.ui(
{ method:'auth.logout', display:'hidden' },
function() { alert("you're logged out!"); }
);
我发现:FB auth.logout 在使用“服务器端工作流程”(OAuth 2.0)登录后被提出,但不确定我是否理解代码足以知道它按我的要求做!