Search code examples
facebookfacebook-likefacebook-sharer

Facebook Like & Share Button not show image content


I'm using facebook like button, after press like button show a window for share content. My content has image and I want to show thumb of that (or just site logo) in facebook time line. How can I do that?

Here is my button configuration

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/tr_TR/all.js#xfbml=1&appId=<APP_ID>";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Here is the button

 <div class="fb-like" data-send="false" data-width="450" data-show-faces="true"></div>

Solution

  • You just have to use Open Graph Tags on your page, see here: http://ogp.me/

    For an image: "og:image". Make sure to use og:title and og:description too.