[Solved] How do I debug a crawled/cached link without Facebook’s URL linter?
I know that once I publish a link to Facebook, a crawler will visit the link and gather information from the og meta tags and cache it. Using Facebooks debugger I can force a refresh of the cached information when I change the share image for example.
If I try to call a URL like https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fstackexchange.com
programmatically or directly while not being logged in, a login page is returned.
Is there a resource or different link I can use to force a refresh of the content without doing it manually on a developer account?
Solution #1:
https://developers.facebook.com/docs/opengraph/using-objects/#update:
When an action is published, or a Like button pointing to the object
clicked, Facebook will ‘scrape’ the HTML page of the object and read
the meta tags. The object scrape also occurs when:
- The object URL is input in the Object Debugger
- Every 7 days after the first scrape
- When an app triggers a scrape using an API endpoint
This Graph API endpoint is simply a call to:
POST /?id={object-instance-id or object-url}&scrape=true
Solution #2:
Just for reference, I wrote a WordPress plugin that does just that for published, scheduled and updated posts.
https://wordpress.org/plugins/facebook-url-linter-for-posts/