By now, I doubt if there is any blogger remaining who doesn’t use social media to promote their posts. Out of these, Facebook is clearly the dominant platform, and I can’t afford to neglect it. So after writing a post, I immediately share it. When you post a link into the share box, Facebook pulls up the default image on your post and adds it as a thumbnail. Most of the time this works perfectly. But sometimes, you make the mistake of either forgetting to add an image to your post or use the wrong one instead. After you go back and correct the mistake and try and share the post a second time, you notice that the image pulled by Facebook hasn’t changed.
Let’s take a look at this problem in action with a concrete example.
Facebook Using Old Images
On the following post, the main image for the article is clearly wrong and bears no connection to the title.
In this example, I’ve made the mistake deliberately but I’m sure we’ve all had situations where we accidentally put the wrong one up. Say I don’t notice the mistake until it’s too late and I’ve already shared the first on Facebook like this:
Now this image is stored in Facebook’s cache and will be reused in the future whenever someone shares this link even if the original image on the post changes. To illustrate this example, let me change the main picture to a more appropriate one:
This is a much better pictorial representation for the post in question and I want to delete my old Facebook share and create a new one so that the new thumbnail appears. But when I repeat the process for sharing the post, I consistently get the old image instead. What’s happened is that for purposes of efficiency, Facebook has stored the old thumbnail in its cache and will continue to serve it up not just to you, but for anyone else who wants to re-share your post as well.
So how do we get Facebook to flush its cache? Fortunately for us, there is a very easy way that Facebook has given us which we can use to achieve just this.
Flushing the Facebook Cache
The first step is to visit the Facebook object debugger using the following URL: https://developers.facebook.com/tools/debug/og/object/
This has a text box called “Input URL”. Paste in the link to your post and hit “Show Existing scrape information”. This will pull up all the metadata for your site that Facebook has stored in its servers. Scroll all the way down until you reach the section called “When Shared, this is what will be included”.
In the screenshot above, you can see that despite having made the change, Facebook is still using the old image thumbnail. What we need to do is request Facebook to refresh its information. Scroll back to the top and this time click the button labeled “Fetch new scrap information”.
This will immediately erase all traces of the previous meta-info and Facebook will crawl your site once again as if for the first time. Since the image on the original post has been changed, it’ll have the latest up-to-date information. When the page is refreshed, scroll down to the same section before and this time you should see that the new thumbnail is included instead:
To test this out and see if it’s actually worked, I try and share the post again and this time Facebook uses the new thumbnail image instead of the old one it was showing before.
You can use the same procedure to generate an image if you forgot to add one the first time around. In fact, you can do this whenever you require Facebook to change its meta-data such as the title or the description of a post by asking it to fetch new scrape information and discard the old.