Blog

Facebook Graph - Creating a Social Web

| 0 comments | facebook

Last week, Facebook announced some interesting things at their F8 conference. Their BIG plan for the world is to make it a more social and personalized web. With this in mind they have released a few tools to help the world.

Starting first with their big initiative, the Graph API which is the foundation of the new API.

This is a fantastically easy way to get machine readable (JSON) real-time information from FB. An example:
http://graph.facebook.com/dylanjamesvernonjones

{ "id": "512982904", "name": "Dylan Jones", "first_name": "Dylan", "last_name": "Jones", "link": "http://www.facebook.com/dylanjamesvernonjones" }

You get some basic information on me. You can delve deeper into my life by getting my news feed by calling :
http://graph.facebook.com/dylanjamesvernonjones/feed

{ "data": [ { "id": "512982904_427382302904", "from": { "name": "Dylan Jones", "id": "512982904" }, "message": "And thats the end of that chapter! (that chapter is maths by the way)", "icon": "http://photos-f.ak.fbcdn.net/photos-ak-sf2p/v43/53/146139331013/app_2_146139331013_1286.gif", "attribution": "TweetDeck for iPhone", "actions": [ { "name": "Get TweetDeck", "link": "http://www.tweetdeck.com" } ], "created_time": "2010-04-30T10:01:30+0000", "updated_time": "2010-04-30T10:01:30+0000", "likes": 2 }, { "id": "512982904_119487514744084", "from": { "name": "Dylan Jones", "id": "512982904" }, "message": "Whats that coming over the hill, is it a monster, is it a monster?", "created_time": "2010-04-29T21:14:12+0000", "updated_time": "2010-04-29T21:14:12+0000", "likes": 2 . . . . . . . . . . . .

Using OAuth 2.0 as authentication, you can get more data, if not everything you could possibly want from events, friends, likes etc. More information is available from the documentation on Facebook's Developers site.

I have already put to use this graph API to cache my public facebook messages on my database for inclusion in my live feed on this site located at: me.dylanjones.info For this I just use the json_decode() function in PHP.

Facebook also announced other things such as social plugins inluding their plan to get a 'Like' button on every page online. Some extra metadata is required for web pages to describe content to facebook, rather than using existing protocols - I did try this on dylanjones.info but it is not valid html so I removed it hastily.

More thoughts and uses for the new Facebook Platform later today.


Comments

Be the first to comment!

Add a comment