Facebook – solve the problem of getting the wrong image when sharing a web page in facebook

Posted by Shek on September 5, 2013 under Misc | Be the First to Comment | Total View: 5,146 views

Social networking has became very popular and facebook is among the leader of them. Users use facebook to share web pages and very often the wrong image will show up in the facebook post.  Here is a solution for the web developers to solve this issue which is using facebook open graph meta tag.

The way to solve the issue is to include facebook open graph meta tag in the web page’ html code’s head section.

Facebook has its own set of meta which it will read from the html source code instead of the standard one, and to tell facebook to display the correct image is:

1
<meta property = "og:image" content="imageAbsolutePath" />

Replace the word imageAbsolutePath with the absolute full path of the image which you want to show up when the page being shared.

The next time whenever that page is being shared through facebook, facebook will display the correct image from the meta tag.

Not what you want? Try a Search

Add A Comment

*