Is there a way to know if a user has liked an object on facebook, given that the user has given my app permission and I have the correct access tokens ??
Asked
Active
Viewed 463 times
1
-
1http://stackoverflow.com/questions/4750012/facebook-check-if-user-liked-the-page http://stackoverflow.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 – Matt Ball Mar 22 '12 at 19:59
-
possible duplicate of [Facebook how to check if user has liked page and show content?](http://stackoverflow.com/questions/6246449/facebook-how-to-check-if-user-has-liked-page-and-show-content) – om-nom-nom Mar 22 '12 at 20:10
2 Answers
1
it seems to me that it is what are you asking for ... https://developers.facebook.com/docs/reference/fql/like/

Luca Rocchi
- 6,272
- 1
- 23
- 23
-
Is there a way to do it via the graph api?? Something like a get request with the access token or something?? – Vishesh Joshi Mar 22 '12 at 21:28
-
of course ... FB states you have to consider fql as part of Graph api read here about ... https://developers.facebook.com/blog/post/579/ – Luca Rocchi Mar 22 '12 at 23:14
0
For people who come across this page and want a more specific answer, I use the following FQL query via the js sdk in order to find out if a specific user has liked a specific object. If they have, it will return an array with their id. If they haven't, it will return an empty array:
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);
});

Matrym
- 16,643
- 33
- 95
- 140