When I first wrote about ingegreating with Facebook
I shared an example on how to share a post link and provide additional data like a picture to use as a thumbnail. This used to tell Facebook
that the provided picture should be shown as the link preview, this no longer works. You can still submit the 'picture'
property as a URL but it will be ignored. This behaviour is described in the Graph API version 2.10
. Fortunately there is a way to control which image Facebook
First lets understand why this change has been made. Facebook
had this to say
about the topic.
As part of our continuing efforts to stop the spread of misinformation and false news on our platform, earlier this year at F8 we announced an important change to our Graph API: Graph API version 2.9 includes a 90 day deprecation of the ability to edit previews attached to link posts.
So it's all about fake news. Although I understand Facebook's
position on this, I do not agree completely with this change. Lets look at what you can do now to control which image appears as a link preview thumbnail...
said, the Open Graph meta tags
are the currently supported way to modify link previews. Fortunately this is easy to add to a CMS
system. It only took me a couple of hours to have a full end-to-end solution in my Blog's
The trick is to implement tags like this in the <header>
of your generated HTML
tag is the one that is required, others are optional but I would recommend using them. This works the same way as back when the 'picture'
property was supported with the API
. Simply put the URL
of the image into the content
attribute and you're done. The image here needs to meet some guidelines e.g. it has be be less than 8Mb in size for Facebook
to download it.
tag specifies the MIME
type of the image. The og:image:width
provide the width and height of the image (in pixels) respectively.
example on posting links is covered in Facebook's
. Don't forget to use the URL Debugger
after making your changes to ensure Facebook
is behaving as you were expecting.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...