The API of microblogging service Twitter continues to be used as the basis for an ever increasing number of creative applications and is helping make Twitter the hottest property online. Now Facebook, with the launch of its highly anticipated Open Stream API, is attempting to gain some of that API-driven attention back.
Facebook's Open Stream API allows developers to access a user's "activity stream," or what Facebook's Ray C. He describes as "what's going on right now in the world around" a given user. This data includes status updates, photos, links, and comments from the user's friends. More importantly, the API also lets applications write data to the activity stream, including information from Facebook Connect sites, which is a first step in Facebook's evolution toward becoming a read/write networking platform.
One of the most interesting aspects of the Open Stream API is Facebook's adherence to the emerging Activity Streams standard. The Activity Streams standard allows websites to publish user stream information in the widely used Atom XML feed format. This standard potentially to allow developers to, for example, easily aggregate user streams from different providers.
The Open Stream API can also return data in JSON or XML format through the new stream functions in Facebook's REST-like API, as well as through FQL, the Facebook Query Language. Facebook's announcement notes that:
In addition to the Activity Streams interface, the Open Stream API includes robust new APIs called stream.get and stream.publish and new FQL tables that enable you to directly access the stream. With these new methods, you can access the stream on behalf of a user and then filter, remix, and display the stream back to that user however you choose, wherever you choose, in the manner most relevant for the user experience. Other new API methods will allow users to both publish into the stream and to add comments and "likes" to posts in the stream.
Facebook's privacy model is much more rigid than that of other user stream providers (such as Twitter), preventing easy access to global public data that its users have posted. Therefore, Facebook users must explicitly grant permissions before an application can access user data. Some have already criticized Facebook's inherent restrictions on data access. Marshall Kirkpatrick, of ReadWriteWeb, laments that the Open Stream API doesn't open up data in a way that will allow developers to take advantage of the rich amount of user generated content on Facebook. He writes:
Unfortunately, the data that developers are able to work with is severely limited. They will simply be able to make a call for a user to Facebook and get back the friends' streams that this particular user has the permission to see... The data that Facebook controls, conversations and social connections, could be used for analysis of real-time social patterns which could lead to world-shaking new insights. Do we get access to that data? No.
The API-level differences between Facebook and Twitter in many ways embody the broader trade-offs in privacy versus openness, to which there's no easy answer.