facebook debugger open graph image not scraping on first attempt

11,964

Solution 1

Here is the answer to this question from facebook:

The provided 'og:image' properties are not yet available because new images are processed asyncronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags

so the thing is, the first time, facebook is not sure about the image's dimensions so no image displays, on the 2nd run, the image is already cached so it can readily check the dimensions of image provided in 'og:image' property.

To make sure that facebook displays image on the first run, og:image:width and og:image:height properties are required.

Solution 2

According to the Facebook "sharing best practices", Facebook needs to scrape the page at least once by someone clicking on it to cache the image. Subsequent shares will then be able to display the image.

Facebook's suggested solution is to manually enter the URL using the debugging tool to pre-cache the image: https://developers.facebook.com/docs/sharing/best-practices#pre-cache-images

Solution 3

I solved a similar issue. I am also using WordPress with Cloudflare.

I installed Facebook Open Graph, Google+ and Twitter Card Tags (1.5.2) to add OG Tags to my posts. I used the plugins update Facebook Open Graph Tags cache when saving the post option to prime Facebook.

But, Facebook still did not scrape the images from the OG Tags even from a primed cache. (On subsequent tests using Facebook Debugger tool Facebook did not even scrape the OG tags at all. Using the "See exactly what our scraper sees for your URL" tool Facebook was only scraping a few lines from the header and not the full header html).

For some reason beyond my humble comprehension disabling Cloudflare Railgun solved the problem for me.

Railgun accelerates the connection between each CloudFlare data center and an origin server so that requests that cannot be served from the CloudFlare cache are nevertheless served very fast.

You can find this setting on the CloudFlare settings page for your domain.

Hope this is helpful.

Share:
11,964
Faizan Afzal
Author by

Faizan Afzal

Updated on June 22, 2022

Comments

  • Faizan Afzal
    Faizan Afzal about 2 years

    I've been facing this issue for the last couple of months. I've been running a wordpress site and I've installed the Yoast Seo plugin. I've enabled the facebook open graph meta tags in that plugin as well. Now, whenever I try to share any post url on my facebook fanpage directly, on first attempt, facebook scraps the description and title of the post, but not the "og:image". I've to refresh my page and when I make 2nd attempt, then it scraps the image or personally, i've to go to facebook debugger tool https://developers.facebook.com/tools/debug/ and debugg my post url each time before sharing that on my fanpage. I've tried to place manually facebook opengraph metatags as well copied from the other websites as well. For which, that problem doesn't occur but still i'm facing the same issue. I would like to mention here as well that I was using Cloudfare DNS servers. But I've changed my DNS servers directly to my main webserver DNS servers but still the problem persists.

    One of my friend, facing the same issue on his website. It looks like we are missing something or we have to add any kind of A or CNAME record ?? Please help me out in this.

    Thanks

  • low_rents
    low_rents about 7 years
    facebook's suggestion can't be a serious thing. I am working on a project which got like 150-300 new articles each day. imagine to manually scrape 150-300 URLs per day....
  • siaeva
    siaeva about 3 years
    This pointed me in the right direction, I went to my webhost and used their cache clearing tool and all updated on FB debugger.