Implementing Facebook OpenGraph

Facebook makes its new Graph interface sound so simple, but what about Facebook OpenGraph? This is where third-party web sites specify extra meta data on their pages, so that Facebook can do a better job of determining what each page is about - and who actually administers it.

Here is the code I've added to my pages (new stuff is in green):

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" > <meta property="og:site_name" content="my-sitename"/> <meta property="og:title" content="my-page-title"/> <meta property="og:description" content="my-page-description"/> <meta property="og:type" content="article"/> <meta property="og:url" content="my-page-url"/> <meta property="og:image" content="my-image-url"/> <meta property="fb:admins" content="my-facebook-id"/>
You obviously need to replace any of the "my-..." content with your own values specific to that page, and by specifying your facebook id with the fb:admins property you can track the page in facebook itself.

For more information visit the Facebook OpenGraph page at developers.facebook.com.


Comments

It's quiet in here...Add your comment