Every one is a fan of Facebook fan page. But if you are a developer, this is for you and will definitely interest you. This easiest way to display Facebook page likes. This actually started when I wanted to display a Facebook fan page with custom styling and didn’t want to get into too much of coding and finally realized this was. The JSON way.
To talk short, here is the code:
$url = 'http://graph.facebook.com/106067452858298';
To explain this code, the number is the unique id of the Facebook page. If you are an admin of the particular page you can get it from
- Click on the ‘Update Page Info’ button
- Facebook page settings will load
- Look at the last row detail
If you are not an admin, still you wish to display for good reason, then
- Hover your mouse pointer on the green button on the page’s ‘Sign Up’
- Note the address bar for ‘https://www.facebook.com/r.php?profile_id=‘
- Open the Facebook page for which you want to display the number of likes
- Ctrl+U or right click->View source
- Search for ‘profile_id‘ under ‘fbTimelineScrubber’
- You will get the unique page id number.
Note: The above two option is only available when you are not logged in.
Here is one from my testing
So, enjoy and keep coding.
And as usual, thanks for reading.