Facebook Open Graph not clearing cache

2019-01-02 19:23发布

I'm having troubles with my meta tags with Open Graph. It seems as though Facebook is caching old values of my meta tags. Old values for Attributes og:title and og:url are still used, even though I have changed them already.

I ran Lint on a page in my site, and this appeared:

Facebook Open Graph lint screenshot

Notice that there are two values for og:title and og:url, and the last one prevailed. However, The last two entries are the OLD entries that I used for this site. I am now currently using these meta tags (you can verify if you view the source of the HTML):

<meta property="og:title" content="Smart og rummelig pusletaske fra Petit Amour med god plads til alt &#8211; værdi 1.099 kr &#8211; køb nu kun 599 kr   "/>
<meta property="og:description" content="Pinq.dk - Det gode liv for det halve"/>
<meta property="og:type" content="product"/>
<meta property="og:url" content="http://pinq.dk/tilbud/landsdaekkende/lissy/"/>
<meta property="og:image" content="http://pinq.dk/wp-content/themes/pinq/images/logo-top.png"/>
<meta property="og:site_name" content="Pinq" />
<meta property="fb:app_id" content="161840830532004" />

Why is Facebook caching og:title and og:url? Is anyone experiencing the same issue?

19条回答
浅入江南
2楼-- · 2019-01-02 19:48

Basically, the answer is patience ;)

I checked the Linter this morning, and og:title and og:url displays correctly, without the redundant values. I guess FaceBook automatically clears its cache at some specific interval. I just have to wait.

enter image description here

查看更多
旧时光的记忆
3楼-- · 2019-01-02 19:48
  1. Go to http://developers.facebook.com/tools/debug

  2. Paste in the url of the page and click debug. If your site is using url aliases make sure you are using the same url as Facebook is using for the page you are sharing (example: in Drupal use the node/* path instead of the alias if the page is shared via that url).

  3. Click in the "Share preview" part on "See this in the share dialog" link
查看更多
墨雨无痕
4楼-- · 2019-01-02 19:51

Yes, facebook automatically clears the cache every 24 hours: Actually facebook scrapes the pages and updates the cache every 24 hours https://developers.facebook.com/docs/reference/plugins/like/#scraperinfo.

查看更多
美炸的是我
5楼-- · 2019-01-02 19:51

We just ran into this, as it turns out, we weren't linting the right url, since the real url had a query string (duh, different page as far as a bot is concerned).

http://example.com/

!==

http://example.com/?utm_campaign=foo

The linter will recache your page, you don't have to wait.

查看更多
旧时光的记忆
6楼-- · 2019-01-02 19:51

Facebook Developer Documents says title property has exception:

Once 50 actions (likes, shares and comments) have been associated with an object, you won't be able to update its title

https://developers.facebook.com/docs/sharing/opengraph/using-objects#update

查看更多
栀子花@的思念
7楼-- · 2019-01-02 19:52

For me all solutions didn't work. I found out if you are using Wordpress with Yoast SEO then you have to refresh this two tags:

<meta property="article:modified_time" content="2017-09-29T00:37:33+02:00" />
<meta property="og:updated_time" content="2017-09-29T00:37:33+02:00" />

To refresh values you have to submit any change to the article. If you don't change this date facebook cache won't refresh.

You can also disable this additional tags by adding filters in functions.php:

add_filter( 'wpseo_og_article_published_time', '__return_false' );
add_filter( 'wpseo_og_article_modified_time', '__return_false' );
add_filter( 'wpseo_og_og_updated_time', '__return_false' );
查看更多
登录 后发表回答