Recently, while researching a side project, I started looking at the Facebook APIs. I was surprised that I couldn’t find a decent library for mocking or faking FQL or the Graph API. Everyone just uses live Facebook to test, sometimes even in unit tests!
A few thousand lines of code later, I had a little utility to fill that void. mockfacebook is a standalone HTTP server that implements Facebook’s FQL and Graph API. It’s particularly useful for automated integration testing. It’s backed by a SQLite database, which you can seed from Facebook or populate manually or programmatically.
Feedback is welcome!