Hello,
I have a problem when my site get shared on facebook.
The picture that is used is not the correct one,
It is a a (random) pic from the page,
But I don't want it to use that, I want it to use another one.
How does it work ?
Solved: Facebook not showing good picture for website
Re: Facebook not showing good picture for website
Facebook uses Open Graph protocol to create a "template" of the web-page.
If it can find it, it will try to create it's own.
Normally it pretty good, but sometimes it goes really wrong.
The good news is, Facebook engineers provided a great tool that can help you:
https://developers.facebook.com/tools/debug/
Now you can dictate what test and pics facebook should use with
Open Graph protocol, more information here.
The most important ones are:
fill in the link to pic you want facebook to use. (size should be at least 200x200 px)
Remember it is per page, not for the site.
So you need to set it on every page.
But it can be different for every page.
If it can find it, it will try to create it's own.
Normally it pretty good, but sometimes it goes really wrong.
The good news is, Facebook engineers provided a great tool that can help you:
https://developers.facebook.com/tools/debug/
Now you can dictate what test and pics facebook should use with
Open Graph protocol, more information here.
The most important ones are:
- og:title - The title of your object as it should appear within the graph, e.g.
- og:type - The type of your object, e.g., "video.movie". Depending on the type you specify, other properties may also be required.
- og:image - An image URL which should represent your object within the graph.
- og:url - The canonical URL of your object that will be used as its permanent ID in the graph,
fill in the link to pic you want facebook to use. (size should be at least 200x200 px)
Remember it is per page, not for the site.
So you need to set it on every page.
But it can be different for every page.