Display Facebook page likes: Easiest way

bitcoins Referral Banners

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:

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

Option 1

  • Click on the ‘Update Page Info’ button
  • Facebook page settings will load
  • Look at the last row detail
facebook page info
Facebook page info
Facebook page settings


If you are not an admin, still you wish to display for good reason, then

Option 2

facebook sign up
Sign Up button
  • 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=
facebook profile_id
Facebook profile_id

Option 3

  • 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.
Facebook page source

Note: The above two option is only available when you are not logged in.


Here is one from my testing

facebook localhost
The real work

So, enjoy and keep coding.

And as usual, thanks for reading.
Keep sharing!


Post Author: Shreyo

is a developer & involved in project management; loves to learn, guide and keep himself updated on UI/UX and WordPress. He is also an amateur photographer mostly macro shots.