Archive for March 21st, 2011

How to get your Facebook follower count in PHP

If you’re looking for a way to fetch and display your Facebook follower count in PHP, here is your code. In the below, substitute __ID__ for your numeric ID for your app or page, and __TOKEN__ for your access token.

Please consult the Facebook Graph API documentation for more information.

This method uses file_get_contents() rather than the preferrable cURL() call. Also, don’t forget to cache your queries, or you may experience API throttling. See the Rest & Graph API Best Practices for reference on this.

Here is the code:

function GetFacebookFollowerCount(){
  $json = file_get_contents('');
  $obj = json_decode($json);
  $new_facebook_followers= $obj->data[0]->values[0]->value;
  return $new_facebook_followers;

Comments and feedback are welcome.

, ,

Leave a comment

Transferring fonts from one Windows PC to another

If you have collected up some fonts on one Windows PC and want to transfer them to another one, it’s actually very simple.

First, open the Fonts folder.

Go to Start > Control Panel

If you’re in category view, switch to classic or icons view, depending on your Windows version.

Double-click on Fonts

Now that you have the Fonts folder open, you can drag-and-drop to install new fonts or copy fonts out.

That’s it! You may have to reboot for any newly installed fonts to show up in your applications, such as Office.

Leave a comment