如何检查Facebook中的特殊权限 [英] how to check special permissions in facebook
本文介绍了如何检查Facebook中的特殊权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ b
解决方案
我有同样的问题,但找不到任何示例代码。无论如何,我想出了这个,对我有用。希望这有助于某人。
FB.api('/ me / permissions',function(response){
var perms = response.data [0];
if(perms.publish_stream){
//用户有权限
} else {
//用户不有权限
}
});
how can i check in javascript if user has granted my site the publish stream permission
?
解决方案
I had this same problem but couldn't find any sample code. Anyways, I came up with this, which works for me. Hope this helps someone.
FB.api('/me/permissions', function (response) {
var perms = response.data[0];
if (perms.publish_stream) {
// User has permission
} else {
// User DOESN'T have permission
}
} );
这篇关于如何检查Facebook中的特殊权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文