Facebook Makes Huge API Changes - Open Graph Protocol and Much More

Facebook has just introduced several sweeping new changes to its Platform at F8, the annual conference for Facebook developers. The web has been abuzz about the implications of Facebook's latest move towards making its platform available on as many web sites as possible.

As Bret Taylor, head of Facebook Platform products, noted on the Developer Blog, the next evolution of the platform focuses is based on two fairly important themes:

First, the Web is moving to a model based on the connections between people and all the things they care about. Second, this connections-based Web is well on its way to being built and providing value to both users and developers — the underlying graph of connections just needs to be mapped in a way that makes it easy to use and interoperable.

Targeting these two themes, Facebook has released three new components: social plugins, the Open Graph protocol, and the Graph API.

Social plugins enable developers to easily add user interaction to web pages (e.g., a "Like" button) using an <iframe> or a combination of XFBML and FaceBook's JavaScript SDK. These plugins essentially provide establish a distributed means for content sharing and interaction in a fairly seamless way.

The Open Graph Protocol provides a way for developers to integrate content with Facebook's social graph. In essence, this means that content can be linked with one or more users, across different parts of their profiles, including profile pages, activity streams, news feeds, and even search results. Currently the protocol is implemented by adding several tags to the <head> of a web page (based on the Open Graph Protocol namespace) and by including a "Like" button (social plugin). The specification for Open Graph Protocol has been published at http://opengraphprotocol.org/.

The Graph API is the next generation of the Facebook API, and it is aimed at providing access to various parts of Facebook's social graph data. The new API is completely RESTful, and by default results are returned in JSON. Access to various data objects has been streamlined, as is evident by the examples below:

Documentation for the new API is available, including advanced parts of the API such as FQL and FBML as well as the now deprecated "Old REST API." Note that the new API utilizes OAuth 2.0 for Authentication and it also includes Integration with Insight, Facebook's analytics service.

And there was one policy change announced today that got a big round of applause from the developer audience: third party applications may now retain Facebook for longer than 24 hours. According to Justin Smith at Inside Facebook, "the change was one primarily motivated by technical costs being created by the policy for developers, instead of any intended change in how developers should use user data." And Mark Zuckerberg said that

Zynga has had to download user information 100 million times per day because of our policy. Developers were having to architect entire systems just to do this. There aren’t any other changes in the policies on how developers can use the data.

Whatever the motivation, while this can indeed make developers lives easier, it also raises privacy issues as more and more Facebook data gets moved outside of Facebook.

Overall, this is certainly a bold move by Facebook in its effort to expand its reach both in terms of users and content across the web (or what Jeremiah Owyang refers to as a "Crusade of Colonization"). The new API, coupled with the Open Graph Protocol and social plugins, present developers with several ways of tapping into the Facebook platform without much heavy lifting.

Be sure to read the next Semantics article: 111 Semantic APIs: MusicBrainz, Calais and DBpedia