Reputation: 109
In my website I am showing some companies' name with their facebook like counts. For most of the companies the counts are coming properly. But for some companies the counts are coming as zero. I have seen that, I even can't open these companies' pages without login to the FB. I think these are secured pages. Can anyone guide me how to get these comapanies' fan/like count? I am using ASP.NET.
Upvotes: 0
Views: 726
Reputation: 25938
This is related to demographically restricted pages. You need an active user access_token
(that is able to see that page) to retrieve details about the page.
Once you have active access token you can retrieve the fan count by either Graph API request
https://graph.facebook.com/19292868552?fields=name,likes&access_token=...
Or next FQL query:
SELECT page_id, name, fan_count FROM page WHERE page_id = 19292868552
Upvotes: 2