Coach Thrasher
YAY, I Fixed my Facebook API :)
Like everyone and their little brother, I've been working on a killer Facebook app. The platform offers so much potential for revenue generation; I just can't pass the opportunity up. I found quite a few architecture issues with the Java Facebook API that Facebook released. It worked, but it wasn't enterprise ready... in particular there were no JUnit tests, no logging, HTTP connection memory leaks, it’s not thread safe, etc. It works for "Hello World", but not my app.
The Javabook API looks cool, but I needed desktop support. I also didn't want to use JSON since FQL returns buggy (ambiguous) results that way for queries (see the Facebook docs, I do like the name though, “JSON” == great name :).
Aside: what’s the business goal of releasing a 3rd party Facebook API? I don’t think the answer is anything close to the logic that created Apache.
So, I've finally fixed my API bug. I don't mean to beat-up on Facebook (because their site, app, business, and developers absolutely rock), but the issue was related to their API documentation. The references to "session", "session key", "session secret" and "secret" for desktop apps versus webapps are ambiguous in their API docs. They are used on different pages in different context to mean similar and different things, depending on the page. Ack! Good documentation is critically important for communicating with others, and this issue just highlighed that for me.
I posted a Mavenized Facebook api (the Facebook original code plus a few JUnit tests plus Maven wrapping) a few days ago. It's been interesting to see how many downloads per day there are... not many == ~4. But heck, there are downloads! So there must be demand for something like this.
If anyone is interested in a more robust API for desktop and webapps, using HttpClient with logging, and per-UserId sessions, thread safety, local callback support, and Maven let me know. It supports all Facebook API calls, including FQL. The code is fully documented with Javadoc. It'll do XML and JSON. It supports Spring-based configuration out of the box. It has a Facebook data model, with MVC style stateless API calls. It'll put your API key and secret through their paces for all API calls using JUnit. It's so good, it'll get you a beer when asked. I’ve got it humming right here and would be happy to license it out.
Posted at 11:14PM Aug 07, 2007 by jason in Software | Comments[1]