Hey i want to check a whether a user likes a certain page and if they do i want to display a message or div? I have searched through the facebook forums for possible solutions but i never came upon anything concrete so i would really appreciate the help.
A:
You should be able to do this through FQL. To check if a user likes some URL:
SELECT user_id FROM like WHERE object_id in (SELECT id from object_url WHERE url="<PAGE_URL>") and user_id=<USER_ID>;
If query is empty then a user doesn't like this url. Otherwise 1 record is returned.
See like
, object_url
.
serg
2010-08-11 15:20:19
A:
Hey thanks for the reply. Ok basically what i am looking to do.
- Check whether a user is a fan of a certain url or page
- If yes, display message
salmon
2010-08-12 09:06:38