December 2009 Archives

Autoloading Facebook's PHP Classes

| No TrackBacks

Being the lead developer of ShareSong has given me a chance to become fairly familiar with Facebook's PHP client library. From the moment I began using the library I had one major complaint: cludgy integration.

We use an autoloader within our PHP frameworks to instantiate objects without manually requiring every class file. As such, I can include my conf.php and create a new Facebook(FB_APIKEY, FB_SECRET); and php can magically figure out that class is within a file called Facebook.php within a specified lib directory. Well, the Facebook platform's client library bundles several (albeit-related) classes into one file, they do not follow our mechanism of ProudCamels for classes, and otherwise make things messy.

Well, being me I decided to "fix" it. So, here it is. Extract it, pop it into your app's library directory and viola! A library client that autoloads and is, beyond some case changes to class-names and restructuring, a completely Facebook-authored PHP client!
Facebook-Platform.tar.gz

About this Archive

This page is an archive of entries from December 2009 listed from newest to oldest.

August 2009 is the previous archive.

March 2010 is the next archive.

Find recent content on the main index or look in the archives to find all content.