If you have a Facebook fan page for your blog, you might want to display how many facebook fans you have. Today’s I will help you to get your Facebook fan count, in full text!
For displaying Facebook fan Count you just have to add the below code anywhere in your theme :
<?php $page_id = "YOUR PAGE-ID"; $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; ?>
Change the YOUR PAGE-ID
on line 2