Easy Way to Change Facebook’s Share Image and Title

Go here http://blog.jambura.com/2011/04/08/easy-way-to-change-facebooks-share-image-and-title/ for updated code.

Now a days, every one wants to share every thing on Facebook. Sometimes there are no image on the page so Facebook will not show any image or you want to change the title of what you want to share.

For example you have a page on you site that shows a YouTube video or Vimeo video. Now you want to show the thumbnail of the video as the Facebook share’s image. How you do it? First we add the Share code on the page.

<a type="button" name="fb_share">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

Now you add the image url and title in the meta tag.

<meta property="og:image" content="http://i.ytimg.com/vi/r7lIS13fXPw/0.jpg"/>
<meta property="og:title" content="The Title"/>

You can add couple of other things on the meta to change the way the share shows information. You can find it HERE. You can see example of the share HERE.

You can also check page using this tool HERE. This tool also can be used as cache clear. For example, YOu had page where you show a image now you want to show a new image. But share is show old image. Just put the page url here and lint.

This entry was posted in Facebook, General. Bookmark the permalink.

Leave a comment