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.
<?php $page_id = "214839665228900"; $xml = @simplexml_load_file ("http://api.facebook.com/restserver.php?method=facebook.fql.query&query=SELECT%20fan_count%20FROM%20page%20WHERE%20page_id=".$page_id."") 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.