User login

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 Tag

You 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

Searched words: 
share on facebook drupal node content share my site on facebook

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

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.