Here is a simple code to put in to count the number of Facebook fans you have on any of your pages. All you need is your Facebook page id: (http://www.facebook.com/pages/edit/?id=XXXXXXXXX)
Just copy and paste wherever you need this.
<?php $page_id = "XXXXXXXXXXXX"; $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; ?>
Replace the “XXXXXXXXXXXX” with your Facebook ID and enjoy!