JeanCarl's Adventures

Open graph

April 21, 2010 |

Earlier today Facebook announced the Open graph, a way to expand the connections between everything and everything on the web.  It sounds a lot like a semantic web.  By categorizing data on websites based on different types of objects with data, collecting, organizing, and analyzing the content is made much simpler for automated systems.  As the API process made retrieving and using information much easier to do, Open graph goes further enabling everyone to participate.

If you’re a developer who writes object-oriented code, this is like heaven.  Having all this data organized into objects makes handling such information so much easier.  In the old days, developers had to write code to retrieve and parse webpages, often bloated, unorganized and containing invalid HTML.  Parsing was often broken when the webpage was updated with minor changes.

Then came APIs that allowed a limited set of methods to return certain data in organized formats such as XML and JSON.  This is a decent solution for the most part.  APIs are often accompanied by documentation that specifies what data is returned.  It is usually agreed upon that such API methods won’t be deprecated or changed drastically that would break applications.  The only problem is that you have to build the interface to interact with the API.  And when you reference other services, each usually has different quirks to pay attention to.

Open graph uses a very basic protocol which has been around for a long time.  Meta tags within the webpage and basic URLs provide the data that is desired.  Being able to pull data from the HTML meta tags allows any developer the opportunity to grab the data quickly.  It also allows any creator of a webpage to include this information easily and with very little knowledge or investment.  No need for an API or platform.  It’s as easy as titling the webpage!

I particularly like that Facebook has simple URLs to retrieve data in the JSON format.  If needed, I just have to authenticate with OAuth and I have access to the data I need.  No need to read complex documentation and send parameters.  A basic URL like http://graph.facebook.com/username will get some data.  And they support POST, and DELETE HTTP headers that allow for adding or deleting objects to the social graph.