2012-03-22 152 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); 
     }); 
相關問題