Search code examples
facebookfacebook-graph-apifacebook-fqlfacebook-page

Facebook FQL Query not returning results in certain cases


I'm trying to get the number of total fans for certain pages.

To do this I'm using the following HTTP get for example on page id:462790137094807 https://graph.facebook.com/fql?q=select+fan_count+from+page+where+page_id%3D462790137094807

But, for certain pages id, for example: 378009835566560 I'm getting an empty result though the page has some fans. https://graph.facebook.com/fql?q=select+fan_count+from+page+where+page_id%3D378009835566560 or another example: https://graph.facebook.com/fql?q=select+fan_count+from+page+where+page_id%3D149294551780718

Why the hell Facebook doesn't return correct values ? Is there anything I'm missing or doing wrong ?

Any help appreciated.


Solution

  • The page 378009835566560 has a user restriction imposed on it. It either blocks users from some countries or of some ages. I can see in the USA, so I'm guessing it's an age restriction.

    You can't get that page's data unless you have authenticated with a user access token who meet's the page owner's criteria.

    To test this, attempt to visit http://facebook.com/378009835566560 from a browser where you aren't logged into Facebook. You'll get a "not found" error. Visit from a logged in browser and you'll see the page (if you meet the criteria).