Is there a way to see if a facebook user liked a page? It might not be the logged in user, a user might not be logged in at all... The page might not be the page where the app is installed. Thanks!
Asked
Active
Viewed 203 times
0
-
did you try this https://graph.facebook.com/
/likes – samirprogrammer May 09 '12 at 07:33 -
Yes, that returns the likes that a page have? I also tried https://graph.facebook.com/UID/likes/PAGEID?access_token=XXX - this seems to work, but only for my account. When I tried with other random accounts, the response is FALSE. Maybe I am setup as developer? :( – Piter May 09 '12 at 07:46
-
why you not using only your account to check likes? you can get all likes in json and then compare with uid wheather user exist or not – samirprogrammer May 09 '12 at 07:49
-
It's the same, I tried to get https://graph.facebook.com/MYID/likes?access_token=XXX - it works, i get all pages I liked, no matter if I'm logged in or not. But for another user, it doesn't work :( – Piter May 09 '12 at 07:54
-
This is the thing: A user, A page... they might not be related, owner... user might not be logged in... As I seen, for the graph/UID/likes/PAGEID - user has to grant the user_likes permission to the app... – Piter May 09 '12 at 08:02
-
yes, then you need user_likes permission to access his likes – samirprogrammer May 09 '12 at 08:06
2 Answers
1
You have to make sure you have the "user_likes" scope. Then you use the graph api by doing a ('me/likes'), and put a condition on it (if name=='yourpage').

Sarah L.
- 85
- 1
- 5
0
You can get user likes with permissions in application or if your application is a canvas application you can get it with this way;
-
-
if canvas application user don't have to give permission you can get it with the link i gave before – Xenon May 09 '12 at 18:57