Get the Number of Facebook Fans & Display it on your website

By | January 25, 2012

Login and Share to get Free Bitcoins

For every visitor from share you will earn Bitcoin/Satoshi

Sponsor Ads


Facebook Page likes

If you are a Facebook page user and want’s to get the number of Facebook page like in your blog this code might help.First you need to know your Facebook page id.The Facebook page id can be got by the graph API.

Like Facebook
Change the to your Facebook page extension.

	$page_id = "214839665228900";
	$xml = @simplexml_load_file
 or die ("a lot");
	$fans = $xml->page->fan_count;
	echo $fans;

Copy and paste the code on your blog or website where you want to see the Facebook Page likes.
Remember to change the Facebook $page_id.
Live Demo at the Home Page footer.

One thought on “Get the Number of Facebook Fans & Display it on your website

  1. Jennifer Wiss

    Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future… Plagiarism detection


Leave a Reply

Your email address will not be published. Required fields are marked *

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.