There have been multiple issue's about which data, or information and images from a certain page or website are to be used by Facebook to show the like.
The main question is: can we control this via this module? The anser now: no, not directly.

However, Facebook introduced OpenGraph for a more semantic web and gives us control over the entities being liked.
Drupal 7 already has RDFa support (a semantic web standard), so the question is how we can leverage this to our benefit.

In the article OGP and Drupalwe can read more about it, and a first drupal module that could help.

Please share your ideas, I think it would be nice to have more control over what to output to Facebook.

More info at Facebook step 2. (Thanks torotil)
And a proposed "solution" by lzimmerman here.

Comments

dmsmidt’s picture

Issue summary: View changes

Extra link to FB

rankinstudio’s picture

Here is how I did it for dynamic content

To add the og:image meta tag to drupal7:

As I have a custom template for a content type, I used drupal_add_html_head().


$uri = $node->field_photo_l['und'][0]['uri']; // my custom photo field will print a relative path to the image
$image_path = file_create_url($uri); // use file_create_url to get a complete url

$element = array( // create the meta tag
  '#tag' => 'meta', 
  '#attributes' => array(
    'property' => 'og:image',
    'content' => $image_path,
  ),
);

drupal_add_html_head($element, 'og_image'); // add the meta tag to the head in the html.tpl.php file

To see an immediate update on the facebook side, put your url in here:

http://developers.facebook.com/tools/debug

ali_b’s picture

rankinstudio, please, how to use your code? in node template?

ali_b’s picture

Issue summary: View changes

extra link