Reputation: 742
I'm trying to check if the user has liked the Facebook page. I request the user_likes permissions, I checked it and it returns that permission. So I guess I'm alright with the permissions.
Then I run the function getInfo. If I use "/me/likes/", I get all the likes of the user. But I want to check 1 page espacially. What am I doing wrong?
function getInfo(){
FB.api(
"/me/likes/id/",
function (response) {
if (response && !response.error) {
/* handle the result */
console.log(response);
}
}
);
}
Upvotes: 0
Views: 1452
Reputation: 31479
You need to replace the
FB.api(
"/me/likes/page-id",
...
code with an actual Page ID like this (for the CocaCola page):
FB.api(
"/me/likes/40796308305",
...
See
Upvotes: 1