2012-03-22 157 views
1

有没有办法知道用户是否喜欢facebook上的对象,因为用户已经给予我的应用程序权限,并且我拥有正确的访问令牌?有没有办法知道用户是否喜欢Facebook上的对象?

+1

http://stackoverflow.com/questions/4750012/facebook-check-if-user-liked-the-page的http://计算器。 com/questions/7397724/how-to-check-if-user-has-already-liked-the-facebook-page http://stackoverflow.com/questions/7486829/how-can-you-determine-if-a -user-has-facebook-liked-your-page-or-not http://stackoverflow.com/questions/7607854/facebook-detect-if-user-has-liked-your-page – 2012-03-22 19:59:15

+0

可能的重复[Facebook的如何检查用户是否喜欢页面并显示内容?](http://stackoverflow.com/questions/6246449/facebook-how-to-check-if-user-has-liked-page-and-show-content) – 2012-03-22 20:10:49

回答

1

在我看来,这是你有什么要求? https://developers.facebook.com/docs/reference/fql/like/

+0

有没有办法通过图形api?就像访问令牌获取请求或东西? – 2012-03-22 21:28:21

+0

当然... FB状态你必须考虑fql作为Graph api的一部分,在这里阅读有关... https://developers.facebook.com/blog/post/579/ – 2012-03-22 23:14:50

0

对于谁遇到这个页面,希望有一个更具体的答案,我用通过JS SDK在下面的FQL查询人以查明特定用户是否喜欢特定对象。如果他们有,它会返回一个数组与他们的ID。如果他们没有,它会返回一个空数组:

 FB.api({ 
      method: 'fql.query', 
      query: 'select user_id from like where user_id=' + UserIDVar + ' and object_id=' + ActionIDVar, 
      return_ssl_resources: 1 
     }, function(response){ 
      console.log(response); 
     }); 
相关问题