0

我在 facebook 应用程序选项卡中遇到了 facebook jql 和 javascript sdk 的问题。如果用户已登录,那么我想阅读该用户是否是该页面的粉丝。如果是这样,则重定向到特定的粉丝页面,否则重定向到另一个页面。但由于某些原因,fql 结果集是空的(但我是页面的管理员,当然也是它的粉丝 ;-))

这是一个代码片段:

if (response.status === 'connected') {
// The response object is returned with a status field that lets the app know the current
// login status of the person. In this case, we're handling the situation where they 
// have logged in to the app.
FB.api({
method:     'fql.query', 
query:  'SELECT uid FROM page_fan WHERE uid=me() AND page_id=188705819498'
}, function(resp) {
if (resp.length) {          

self.location.href = 'fanpage.html';
} else {
self.location.href = 'infopage.html';
}
}
);    
4

1 回答 1

2

您需要 user_likes 权限才能阅读他/她的喜欢。如果没有帮助,请尝试 PHP SDK。当 javascript 和 PHP 返回不同的结果时,我遇到了这样的问题。

于 2013-05-10T10:22:40.403 回答