Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook like - showing cached version og:image, way to refresh or reindex it?

Having an issue with Facebook like and a cached og:image.

Long story short: Facebook has cached an older version of our like image. The meta content URL can't be changed. Is there anything I can do to refresh it?

Long story: The site I'm working on has a meta tag for an og:image that Facebook uses when a page is liked. This meta tag uses the same image URL on all pages across the site. The image is simply a branding image for the site.

The issue is the site recently updated their branding, and we can't get the Facebook like image to update. When a user clicks the like link, the resulting post to Facebook still shows the old branding image.

The meta tag is similar to:

<meta property="og:image" content="http://[domain].com/images/bookmark/apple-touch-icon.png"/> 

Whenever a like makes its way to Facebook, the URL to the image is changed to the cached Facebook URL, similar to this:

http://external.ak.fbcdn.net/safe_image.php?d=AQDajxm-qgVNdfEL&w=90&h=90&url=http%3A%2F%2F[domain].com%2Fimages%2Fbookmark%2Fapple-touch-icon.png 

This URL displays the older version of the site's branding. It has been over a week, and it has not updated yet.

Is there any way to force Facebook to reindex the image/clear it's cache? Or, does Facebook periodically do this automatically? I couldn't find any relevant information on this.

I know that changing the URL in the meta tag could fix the issue, but the meta tag is generated by code used across multiple sites and it can not be changed. I also tried the delinter tool as was suggested to me by others. No luck.

like image 599
FHM Avatar asked Sep 27 '11 16:09

FHM


People also ask

How do I clear OG cache on Facebook?

The Best Way to Clear Facebook's Open Graph Cache The easiest way to clear out Facebook's open graph cache is to use their debugging tool. Enter your URL of the page, hit 'debug' and then on the next page, hit 'fetch new scrape information' or 'scrape again'.

How do I change the OG image?

You can set a custom og:image on a page by page basis. Just go to Page Settings > Social Image > Upload. If you need to add other OG tags and customize the default settings, go to Page Settings > Advanced > Page Header Code Injection. Read the following section on adding the tags manually and copy-paste the code there.

How do you update Facebook cache?

On Facebook, refreshing the cache is rather simple. Go to this page, enter the URL of your page and then click “Debug”. The cache is refreshed and now you can share your link with the up-to-date information.

What does this mean the OG Image property should be explicitly provided even if a value can be inferred from other tags?

Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags. If you do not have the Open Graph tags specified, then Facebook will only fill in the gaps for the image, title, and description.


2 Answers

You can use Facebook's object debugger which will allow you to enter the page URL and then on the next page you can re-submit it in a request to 'Fetch new scrape information'. This will clear Facebook's cache for the given URL - Not that it may take some time to propagate around all their cache nodes.

Facebook's Object Debugger can be found here: https://developers.facebook.com/tools/debug/

We recently found that Facebook was caching URLs using a query string against the relative URL and that the query string was being ignored which messed up a few dynamic images we were serving purely based on the query string.

It turns out that you can specify a last modified timestamp (in Unix timestamp format) to help ensure when FB crawls your site, it always gets the correct image.

This can be done by including the following OG meta tag:

<meta property="og:updated_time" content="123465789" /> 

For dynamic sites you'll want to generate the content value - using PHP the current Unix timestamp can be inserted as follows:

<meta property="og:updated_time" content="<?=time()?>" /> 
like image 24
Aran Avatar answered Sep 28 '22 05:09

Aran


Insert your URL into their linter and it should reload its cache

like image 121
genesis Avatar answered Sep 28 '22 05:09

genesis