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

No TrackBacks

TrackBack URL: http://mykestubbs.com/mt/mt-tb.cgi/9

About this Entry

This page contains a single entry by Myke published on December 4, 2009 8:59 AM.

Grooveshark 2.0 was the previous entry in this blog.

Chef Server Installation On CentOS 5.4 is the next entry in this blog.

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