如何清除 Facebook 共享器缓存?
我们使用链接:
http://www.facebook.com/sharer.php?u=[shared URL]
...来共享特定页面。但是,Facebook Sharer 使用图像和标题的缓存版本。有没有办法快速清除 Facebook 缓存,或者我们需要等待多长时间才能更新数据?
我将 放在标签之间。
We used the link:
http://www.facebook.com/sharer.php?u=[shared URL]
...to share a particular page. However, Facebook Sharer uses the cached version of the images and the title. Is there a way to quickly clear the Facebook cache or how long do we have to wait until the data gets updated?
I placed <link rel='image_src' href='[preview image]' />
in between the tags.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
我找到了解决问题的方法。您可以访问此网站:
https://developers.facebook.com/tools/debug
。 ..然后输入您要共享的页面的URL,然后单击“调试”。它将自动提取元标记上的所有信息并清除缓存。
I found a solution to my problem. You could go to this site:
https://developers.facebook.com/tools/debug
...then put in the URL of the page you want to share, and click "debug". It will automatically extract all the info on your meta tags and also clear the cache.
使用api 有没有强制的API Facebook 又要抓取页面了吗?
Use api Is there an API to force Facebook to scrape a page again?
提示:Umair Jabbar< /a>
Hat tip: Umair Jabbar
我认为这两个链接对您的问题相关内容进行了广泛的讨论。 调用清除现金
fb:ref 通过这样的
您可以从这里研究相关的内容 fb:ref 。我希望它对你有用
I thing these two links have a wide discussion on your problem related stuff. fb:ref clear cashes by calling
like this
You can study the related stuff from here fb:ref. I hope it will work for you
执行此操作的页面位于 https://developers.facebook.com/tools/debug/ 与其他一些答案相比略有变化。
将您的 URL 粘贴到其中并点击“调试”。然后点击 URL 文本字段下的“获取新的抓取信息”按钮,一切就都准备好了。它会从您的页面中提取新的元标记,但它们仍然会缓存,因此请记住,每当您更改它们时都需要执行此操作。如果您正在使用元标记来让 FB 共享 URL 按照您希望的方式在 facebook 内部进行格式化,这一点非常重要。
The page to do this is at https://developers.facebook.com/tools/debug/ and has changed slightly since some of the other answers.
Paste your URL in there and hit "Debug". Then hit the "Fetch new scrape information" button under the URL text field and you should be all set. It'll pull the fresh meta tags from your page, but they'll still cache so keep in mind you'll need to do this whenever you change them. This is really critical if you are playing with the meta tags to get FB Shared URLs to format the way you want them to inside of facebook.
这个答案是为开发人员准备的。
清除缓存意味着该网页的新共享将显示 OG 标签中提供的新内容。但前提是您正在处理的 URL 的互动次数少于 50 次(点赞 + 分享)。它也不会影响已发布在 Facebook 上的此网页的旧链接。只有当再次在 Facebook 上共享 URL 时,Facebook 显示链接的方式才会更新。
catandmouse 的答案是正确的,但您也可以通过向 graph.facebook.com 发送发布请求来清除 OG (OpenGraph) 缓存(在撰写本答案时适用于 http 和 https)。您不需要访问令牌。
到 graph.facebook.com 的 post 请求可能如下所示:
在 Perl 中,您可以使用以下代码,其中库 Mojo::UserAgent 用于发送和接收 HTTP 请求:
通过终端发送此 post 请求可以通过以下命令:
This answer is intended for developers.
Clearing the cache means that new shares of this webpage will show the new content which is provided in the OG tags. But only if the URL that you are working on has less than 50 interactions (likes + shares). It will also not affect old links to this webpage which have already been posted on Facebook. Only when sharing the URL on Facebook again will the way that Facebook shows the link be updated.
catandmouse's answer is correct but you can also make Facebook clear the OG (OpenGraph) cache by sending a post request to graph.facebook.com (works for both http and https as of the writing of this answer). You do not need an access token.
A post request to graph.facebook.com may look as follows:
In Perl, you can use the following code where the library Mojo::UserAgent is used to send and receive HTTP requests:
Sending this post request through the terminal can be done with the following command:
将 ?v=random_string 附加到 url。
如果您将此想法用于 Facebook 共享,请确保响应中的 og:url 参数
与您共享的网址匹配。这也适用于 google plus。
对于 Facebook,您还可以通过向 https://graph.facebook.com 发出发布请求来强制重新抓取
Append a ?v=random_string to the url.
If you are using this idea with Facebook share, make sure that the og:url param in the response
matches the url you are sharing. This will work with google plus too.
For Facebook, you can also force recrawl by making a post request to https://graph.facebook.com
我刚刚在相关帖子上发布了一个简单的解决方案,需要 5 秒钟 - Facebook 调试器:清除整个网站缓存
简短的回答...将永久链接设置中的 worpdress 网站上的永久链接更改为自定义链接。我刚刚添加了一个下划线。
/_%帖子名%/
然后 Facebook 将它们全部作为新的网址、新的帖子进行抓取。
I just posted a simple solution that takes 5 seconds here on a related post here - Facebook debugger: Clear whole site cache
short answer... change your permalinks on a worpdress site in the permalinks settings to a custom one. I just added an underscore.
/_%postname%/
then facebook scrapes them all as new urls, new posts.
如果您使用带有缓存插件的 WordPress,请确保清除所有缓存。另请确保您使用的图像具有建议的 Facebook 尺寸:1200(宽)x 630(高)或 600 x 315。
if you are using wordpress with a cache plugin, make sure you clear all your caches. Also make sure the image you are using has the recommended facebook size: 1200(w) x 630(h) or 600 x 315.
如果您使用托管 WordPress 或缓存插件,则必须先清除缓存,然后 facebook 调试器工具才能获取新信息!
几个星期以来,我一直在绞尽脑汁地想弄清楚为什么我所做的更改在 24 小时内都不会显示在 facebook 调试器中!!!!解决方法是我必须进入我的 WordPress 仪表板,单击顶部的 godaddy 图标,然后单击“刷新缓存”。我认为许多托管 WordPress 托管商都有一个缓存来弄清楚如何清除它,你会很高兴。
If you used managed wordpress or caching plugins, you have to CLEAR YOUR CACHE before the facebook debugger tool can fetch new info!
I've been pulling my hair out for weeks figuring out why changes I made wouldn't show up in facebook debugger for 24 hours!!!! The fix is I have to go into my wordpress dashboard, click the godaddy icon on the top, and click "flush cache." I think many managed wordpress hosters have a cache to figure out how to clear it and you'll be golden.