Facebook ignores OG image on first account

I am developing a WordPress site and using the yoast seo plugin to create an og image on a dynamic page. However, I think this is not related to this. The link to the og image is displayed fine, but if I click the Share button, the image will not be included if I have not already clicked on the sharing button before or if I did not use the facebook developer tool to clear the page first.

Perhaps this is a problem with facebook or a problem with the server?

+3
source share
1 answer

You can avoid this by either getting your content β€œpre-cleaned” to start cleaning through the API as soon as you publish it, or by setting the image size using the OG meta tags.

https://developers.facebook.com/docs/sharing/best-practices#precaching :

When sharing content, the Facebook crawler cleans and caches metadata from a common URL. The crawler must see the image at least once before it can be displayed. This means that the first person who shares part of the content will not see the displayed image.

There are two ways to avoid this and render images with the first Like or Share action:

  • URL-
    URL- URL-, . , .

  • og: image: width og: image: height
    , , , .

, , ; , , , OG ( ), .

+5

Source: https://habr.com/ru/post/1667540/


All Articles