facebook share/like/comment -> define thumbnail image

Defining the thumbnail picture used by facebook on fb-commenting, liking or sharing web content:

Set some headertags:

<link rel="image_src" href="Your_URL_to_the_image'" />
<meta property="og:image" content="Your_URL_to_the_image" />

If you use drupal, you can use this snippet:

  $url = url($relative_img_path, array('absolute' => true));
  drupal_set_html_head('<link rel="image_src" href="' . $url . '" />');
  drupal_set_html_head('<meta property="og:image" content="' . $url . '" />');

To clear the facebook-cache on the url you are testing around, use this:
http://developers.facebook.com/tools/debug

Idea: http://www.theitechblog.com/1403/solution-to-facebook-like-button-thumbn...

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Sie können syntax highlighting von Quelltext aktivieren, indem Sie folgende Tags einsetzen: <code>, <blockcode> The supported tag styles are: <foo>, [foo]. PHP-Quelltext kann auch in "<?php ... ?>" oder "<% ... %>" eingepackt werden.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zeilen und Absätze werden automatisch erzeugt.
  • Sie dürfen andere Beitrage mit [quote] Tags Zitieren.

Weitere Informationen über Formatierungsoptionen

CAPTCHA
Diese Frage dient dazu festzustellen, ob Sie ein Mensch sind und um automatisierte SPAM-Beiträge zu verhindern.
s
X
x
s
k
C
Enter the code without spaces and pay attention to upper/lower case.
 

Too Cool for Internet Explorer