Facebook Graph API - likes returns me an empty set
I read in the Changelog of 2010-12-12:
GET [page-id]/members/[user-id] will return the individual user if he or she is a fan of the page (Graph API equivalent of pages.isFan) (rE322057)
So, you can check with Graph API if a known user_id is fan of a known page_id with exactly this syntax. You need to supply a valid access_token. With the fields parameter you can choose, what the API should return. E.g. append "&fields=id,name,picture" to get the id, name and picture in case the user is a fan.
{
"data": [
{
"id": "712084216",
"name": "Mike Bretz",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs842.snc4/70441_712084216_5491098_q.jpg"
}
]
}
You'll get an empty result if the user is not a fan
{
"data": [
]
}
add user_likes permission to your application