Social share buttons have become very popular these days and you seem to find them on almost every website. They simply share content to the user’s friends and fans on social platforms and has become a useful tool in web marketing.
These buttons, by default, share an image on the current page of the site and an excerpt with a link back to your site. Most times shared buttons get it right. They picked the right image with the right content. But when they get it wrong, it could cause you a bit of harm.
Some of the share buttons implement an image picker where the person sharing can choose from a range of images or simply delete the image. The Facebook share buttons by default do not offer this (to the best of my knowledge as at this time) and this could also cause a wrong image to object mapping if you also use the Facebook recommendation box on your site.
Facebook is not ignorant of this as they have made provision to correct or ensure the right image to object mapping is done. Add the following Open Graph protocol
<meta> tags to the head of your webpages with their respective values.
<meta property="og:title" content="Title of content"/> <meta property="og:url" content="current url"/> <meta property="og:image" content="url to image"/> <meta property="og:site_name" content="Name of site"/> <meta property="og:description" content="Description of site or content"/>
- og:title – The title of your object.
- og:image – An image URL which should represent your object within the graph. The image must be at least 50px by 50px, although a minimum 200px by 200px is preferred and 1500px by 1500px is recommended for the best possible user experience. The image can have a maximum aspect ratio of 3:1. Supported formats are PNG, JPEG and GIF. You may include multiple og:image tags to associate multiple images with your page. (Note: image sizes must be no more than 5MB in size.)
- og:url – The canonical URL of your object
Note: If you are implementing this on an already running site, it may take a while for you to start noticing changes.
Click here to learn more about Open Graph protocol