Exothug Exothug - 21 days ago 11
PHP Question

How to get like count of an FB page in graph sdk (PHP)?

I've recently been working with the graph API for Facebook and i want to create a script that lets me input a

page_id
and will then return the like count of the specified page.

I've already taken care of getting an access token and logging in, but i can't seen to find anything concerning the total like count of a page in the Reference.

Answer

This would be the API call:

https://graph.facebook.com/bladauhu?fields=fan_count&access_token=xxx

You can use any Token if the Page is not restricted by age or location. If it is restricted, you need a User or Page Token of a user who can see the Page.

More information:

Comments