A Facebook application used to be a must-have, just like an iPhone or an iPad app is now perceived to be. But lately, a growing sentiment among developers is a serious dislike of working with Facebook’s API. While every API presents itself with a set of quirks and annoyances, the Facebook API seems to be growing more dysfunctional the more it matures. The hallmarks of most good APIs are:
- HTTP based.
- Be a RESTful resource, support (at a minimum) XML, JSON, RSS.
- Support Basic Auth or OAuth.
- Be simple.
While Facebook qualifies under some of these it fails short in a few major ways:
Lack of support for basic Auth or OAuth is heartbreaking. Having to authenticate using Facebook Connect is full of cross domain problems. It’s also a very difficult authentication method for any large site that supports multiple domains, as Facebook connect is limited to 1 domain. I don’t want to have to use JavaScript to authenticate a user. It adds a whole level of complexity and possibility for error that I don’t need. I want to use Curl, and I want to be able to interact with the Entire API using http requests running quietly in the background.
Facebook needs to lose their multi-level permission structure. If I have a user’s credentials I should be able to do everything the API exposes. Having to get permission and deal with pop-ups for everything is a UI nightmare. Want to post offline? Deal with a pop-up and grant me permission. Want to upload a photo? Deal with a pop-up and grant me permission. The list is endless. KISS: Keep It Simple Stupid.
While Facebook’s API exposes everything under the sun, I bet a very small percentage of apps take advantage of this. All I want to do it to post to your stream or page, get your activity, and interact with your friends. Just like twitter. Maybe upload a photo or video. I don’t need 800 API methods that are constantly changing, being canceled, changing permission settings, etc..
Facebook is about sharing with friends, and yet, they have made it close to impossible for 3rd party apps to actually engage in any sort of social behavior. They discontinued the notify API call, which wasn’t great, but it was something. If you’ve installed my app, and you want to do something with one of your friends, your sorry out of luck unless they too have installed my app.
It’s 2010, how can you not offer RSS feeds of every facet of your site? At a bare minimum I should be able to get my activity, and my friends activity as an RSS feed. I deserve more, but this would be a good starting point.
But perhaps the most frustrating part of the API is that there are no clear examples on how to tackle common development problems. For a more clear example of this, do a search in the forums for ‘Post to users’s page’, and you will be greeted by a sea of discontent from the developers. Everyone looking for the same answer, and everyone comparing notes, but no one able to provide a clear and concise way to get it to work. Confusion amongst API developers is a bad sign, and ends up creating bad apps. Facebook should take the top 10 most commonly used API calls, and provide examples on how to use each across their various libraries. It would be a win for developers, and a win for Facebook, as the apps that live in their ecosystem would suck less.