I need using javascript to check if the current user is fan of my page.
I goto here https://developers.facebook.com/docs/reference/rest/pages.isFan/. In Test Console I don’t understand about Application parameter?
I using this code below, but it’s always alert “You like the Application” for any user even guest
window.checkDoesLike = function() {
FB.api({ method: 'pages.isFan', page_id: '138992766181857' }, function(resp) {
if (resp) {
alert('You like the Application.');
} else {
alert("You don't like the Application.");
}
});
};
I’ve written an extended tutorial about this here.
There are a couple of points to highlight:
uidparameterif(resp)is not enoughBetter code:
Quoting: