这是我的代码:
FB.ui({method: "permissions.request", "perms": 'publish_stream', 'display': 'popup'}, function (response) {
console.log(response)
console.log(response.perms)
}, {scope: 'publish_stream'});
结果总是'假',有人知道原因吗?
谢谢
这是我的代码:
FB.ui({method: "permissions.request", "perms": 'publish_stream', 'display': 'popup'}, function (response) {
console.log(response)
console.log(response.perms)
}, {scope: 'publish_stream'});
结果总是'假',有人知道原因吗?
谢谢
该permissions.request
对话框不再(不再?)在规范中FB.ui
:
https ://developers.facebook.com/docs/reference/javascript/FB.ui/
似乎确保用户已登录并具有操作所需权限的唯一方法是使用FB.login()
具有适当权限范围的组合,然后FB.api('/me/permissions')
查询 Graph:
FB.login(function(response) {
if (response.status === 'connected') {
FB.api('/me/permissions', function(response) {
if (response.data && response.data[0] && response.data[0].publish_actions) {
console.log("You got'em!");
}
});
}
}, { scope: 'publish_actions' });