How to: Display Facebook Page Fans count on your blog/website

Do you have Facebook page for your business? Did you ever tried to display your Facebook fans count on your blog/website? Some developers, using heavy plugins to display their Facebook fans count on their website. I really don’t like to install those heavy plugins to do little things like this. So decide to create a simple script for display the fans count. Yeah, its’s done. This code is very simple. I think, it’ll be very helpful for you.

step 1: Adding code to your site

We use the following php function to retrieve your Facebook fans count. Copy and paste it your common functions coded file like config.php, main_functions.php, engin.php etc..

For an example: WordPress uses the function.php file to write common custom functions for particular themes. If you are a WordPress develpoer open functions.php, paste this script and save the file.

step 2: Display Followers count

Now simply call that function any where you want show your fans count on your site/blog. You can use your Facebook Page ID or UserName as function’s input value. checkout the examples below and also try the live demo.

Function calling examples

  1. Input as Page ID


  2. Input as Page UserName


It’s very simple, right? If you like this script don’t forget to share with your friends also learn How to: Display twitter followers count on your blog/website If you have any bug report, please share it below.