I needed to enable Open Graph functionality on a Drupal 6 site this week and the Drupal module directory didn’t seem to have the goods. Googling didn’t show up much either; there is a module for Drupal 7, but I’m stuck in Drupal 6 for now. So here we are, the first version of a Drupal 6 “opengraph” module. It’s not yet in use on any live sites, so please let me know how you get on if you try it out.
Download version 0.2 for Drupal 6: opengraph-6.x-0.2
What?
If you don’t know what the Open Graph is, a crude way of explaining it could be “Facebook’s take on the semantic web”. Marking up your web pages with specific meta tags allows Facebook to extract meaning as to what the pages represent. i.e what they mean in terms of real-life entities; for example a movie, or a landmark or a politician. This means when a visitor to your site likes something (via the ubiquitous like button) contextual data including a neat thumbnail image is made available to the Facebook page that gets created by the action. It also allows you to claim the Facebook page by adding your Facebook user IDs to the markup.
For more information on the Open Graph Protocol, see opengraphprotocol.org
The module
See the README file for full information, but in short:
- Install and enable it (it’s grouped into the ‘Facebook’ section)
- Go to the settings page at admin/content/opengraph
- Configure site defaults
- Map node content types to Open Graph object types
- On the edit screen for any type-enabled nodes you can override the default meta data
- Add the basic like button block to test it out, or just add your own social plugins
Note: I would like to contribute this to the Drupal module directory, but this is a very early version and I don’t currently have CVS access. Lets see if you like it first.
The markup this module creates can still be used by any site/service. I haven’t missed the point, but currently the Open Graph is strongly (possibly exclusively) associated with Facebook. Readers of this blog and most people looking to implement OG will be expecting this context.
Hi Tim,
Will give it a try ASAP.
Think you’ve missed part of the point of the OG protocol though – the idea is that *any* site/service can ‘extract meaning as to what the pages represent’, not just Facebook!