Possible Duplicate:
How to check if a user likes my Facebook Page or URL using Facebook’s API
Is there any way to check with JS if I did "like" a Facebook page?
Possible Duplicate:
How to check if a user likes my Facebook Page or URL using Facebook’s API
Is there any way to check with JS if I did "like" a Facebook page?
You can use FQL to check the page_fan
table
Documentation here
Query like so
SELECT created_time FROM page_fan WHERE uid='$UID' and page_id='$PAGE_ID'
if a row exists, then they are a fan.
You can call the api with the javascript SDK like so:
FB.api({
method: 'fql.query',
query: 'SELECT created_time FROM page_fan WHERE uid=' + uid + ' AND page_id=' +page_id,
return_ssl_resources: 1
}, function(response){
console.log(response);
});