Possible Duplicate:
Seamless way to check if user likes page
How can I make a like to unlock content tab on Facebook?
I´ve seen some applications that let me do this, but I don't want any branding on my tab.
Possible Duplicate:
Seamless way to check if user likes page
How can I make a like to unlock content tab on Facebook?
I´ve seen some applications that let me do this, but I don't want any branding on my tab.
You need to query page_fan, example using JavaScript SDK:
var fqlQuery = "SELECT uid FROM page_fan WHERE page_id = " + pageId + " and uid=" + userId;
var query = FB.Data.query(fqlQuery);
query.wait(function (rows) {
if (rows.length == 1 && rows[0].uid == userId) {
alert(true);
} else {
alert(false);
}
});
I think that will you need to ask for this permission: user_likes
First you will need to find if the user is a fan or not. You can use the signed_request
to do so. "You will need to register a Facebook application". Read more about signed_requests
at Signed Request.
Then you can use the returned data to find if the user is a fan, administrator, etc.