Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook debugger open graph image not scraping on first attempt

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

like image 714
Faizan Afzal Avatar asked Jan 26 '15 07:01

Faizan Afzal


People also ask

Why Facebook Debugger is not working?

If you've updated your social settings or metadata for an article and aren't getting the right details on Facebook yet, you might need to force update Facebook's cache of that page. To do that, go to the Facebook debug tool, enter the URL you wish to update, and click the “Scrape again” button.

How often does Facebook scrape my page?

By default, Facebook scrapes each link every 30 days (source). This leads to two potential problems: If there are issues with the Open Graph meta tags in your content (or if you're not using a plugin that adds Open Graph meta tags), you might see the wrong image or title when someone shares your link on Facebook.


2 Answers

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.

like image 167
Aurangzeb Avatar answered Sep 28 '22 01:09

Aurangzeb


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

like image 38
Nic Mitchell Avatar answered Sep 28 '22 02:09

Nic Mitchell