Error "URL unavailable" for Facebook comment cache?

Our site uses the Facebook Comments Box plugin. We turn on the comment window on our intermediate site, which is located behind our firewall, which means that Facebook cannot access it and generates the error "URL is unavailable." I understand it.

However, as soon as the page is published and accessible by Facebook, the error is still displayed. This can be easily fixed by clicking on the debug link provided with the error, but my content editors do not want to do this every time, and they sometimes forget.

It seems that the available status is cached and reset after using the debugger. Can anyone think of another explanation?

I believe that I could omit the Facebook comment box from the intermediate site, but would rather not. Any other ideas?

+4
source share
1 answer

In the Like Button documentation, they explain when a page breaks:

When does Facebook clear my page?

Facebook needs to clear the page to find out how the site displays it.

Facebook resets your page every 24 hours to ensure properties are timely. The page is also cleared when the administrator for the open schedule page clicks the Favorites button and when the URL is entered into the Facebook URL Linter. Facebook looks at the cache headers on your URLs - it will look at "Expires" and "Cache-Control" in order of preference. However, even if you specify a longer time, Facebook will clear your page every 24 hours.

Scraper user agent: "facebookexternalhit / 1.1 (+ HTTP://www.facebook.com/externalhit_uatext.php)"

Here are three options:

  • You can call the debugger by issuing a simple HTTP request, you can do it from the server when publishing your article (or what you ever publish), you do not need to use the debugger tool.

  • You can check the user agent string for requests, and if it resets facebook so that it can cache the page.

  • You can use different URLs for production and production, so that the cache of intermediate pages will not make any difference in production.

+2
source

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


All Articles