How to get Facebook page fan count using PHP ?

It’s pretty easy to obtain the like count via Facebook’s Graph Api.This small code snippet given below uses FaceBook’s graph api and returns the likes count of the page. There is no need to have the FaceBook access token to call the api and get the will receive result as a JSON object and you can extract the number of likes from it.

Simple Function to Get Facebook Page fan Count

How to use Above function

In order use getPageFanCount() function you have to pass page id as parameter as shown below

That’s it.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.