Sharing Drupal pages on Facebook
You can get the most important tag out of the box with Meta tags (aka, for historical reasons, NodeWords).
(Having a description meta tag prevents your header or left-column menu from being used as the teaser text on Facebook, and Meta Tags even lets you customize the description tag text.)
But what of the other, more specific tags?
From http://www.facebook.com/share_partners.php
In order to make sure that the preview is always correctly populated, you should add the tags shown below to your html. An example news story could have the following:
<meta name="title" content="Smith hails 'unique' Wable legacy" />
<meta name="description" content="John Smith claims beautiful football is the main legacy of Akhil Wable's decade at the club. " />
<link rel="image_src" href="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" />As shown, title contains the preview title, description contains the preview summary and image_src contains the preview image. Please make sure that none of the content fields contain any html markup because it will be stripped out. For consistency's sake, please use the <meta> tag to provide text data for the preview, and the <link> tag for any source urls.
The title and summary tags are the minimum requirements for any preview, so make sure to include these two.
Medium Type TagYou may also specify the type of content being shared by using the following tag:
<meta name="medium" content="medium_type" />Valid values for medium_type are "audio", "image", "video", "news", "blog" and "mult".
(More info on multimedia tags is at that page)
Report back to this ancient, but still living, thread:
How to add meta tag to drupal page?
http://drupal.org/node/14811
Comments
How do you output the link rel="image_src" tag?
Hi There,
I'm just wondering how you managed to use the nodewords module to add the link rel="image_src" tag. I can't find any options for it, and I thought it only dealt with the meta tags.
Please clarify, I would be very grateful.
Regards,
Andrew
The nodewords/metatags module does not do this
Your content type or views output/template will have to do this.
Post new comment