Let's do Open Graph metatags for Drupal content types with the brand new Meta tag module!
This tutorial is about creating Open Graph metatags for Recipes, but these simple steps are appicable to any Drupal content type & Open Graph type.
For this tutorial I’m assuming you've setup a basic Food Recipe content type or that you have the Recipe content type from the Recipe module with an image field.
First enable these modules (they’re included in the Meta tag module)
Meta tag API
Meta tag UI
Open Graph meta tags
Then go to Home » Administration » Configuration » Search and metadata (it’s at example.com/admin/config/search/metatags)
Click ‘Add a meta tag default’ (or go to /admin/config/search/metatags/config/add)
Next, select the Food Recipe content type as type. (you might have to clear cache before your Recipe content type shows up here)
Click 'Add and Configure', and click ‘Open Graph’ to open it up.
Now make it look like the screenshot
So for ‘Open Graph type’ we’ll select ‘Food’ and at ‘Open Graph Image’ we’ll put the [node:field_recipe_image] token. If your recipe image field has a different name, find the token for it in the token list at the bottom of the settings page.
Save.
Now your Search and metadata list will look a bit like this.
Notice the 'Node: Cooking Recipe'.
Now test your Open Graph tags at http://developers.facebook.com/tools/debug
it will look something like this:
To make the 'Extraneous Property' warnings go away you could disable core's RDFa module. (ugly I know, sorry, thats the only solution I currently know).
And if you know of a neat solution to the 'og:locale' warning, please let me know, I haven't had the time to figure it out yet.
And it's giving us <meta property="og:type" content="food" />, but also says og:type is website, hope that's a Object Debugger glitch, but it could use some testing.
Update2:
To be able to apply image Styles (called imagecache presets in Drupal 6) on an image and use it as Token, have a look at this project: http://drupal.org/project/imagecache_token
The ability to imagecache_token all kinds of Entities is being built here:http://drupal.org/node/1525210