Facebook调试器:清除整个网站缓存 [英] Facebook debugger: Clear whole site cache

查看:163
本文介绍了Facebook调试器:清除整个网站缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,Facebook会在首次访问您网站上的特定页面时为其缓存赞"数据,并且将URL输入调试器页面会清除缓存.但是,我们现在已经改善了我们的Facebook描述/图像/等,我们需要刷新整个网站的缓存(约300页).

I am aware that Facebook caches the Like data for specific pages on your site once they're visited for the first time, and that entering the url into the debugger page clears the cache. However, we've now improved our Facebook descriptions/images/etc and we need to flush the cache for the entire site (about 300 pages).

是否有一种简单的方法来执行此操作,或者如果我们需要编写一个例程来逐一纠正它们,那么实现此目的的最佳方法是什么?

Is there a simple way to do this, or if we need to write a routine to correct them one by one, what would be the best way to achieve this?

推荐答案

有没有简单的方法可以做到这一点,

Is there a simple way to do this,

没有那么简单,它可以清除整个域的缓存,

Not as simple as a button that clears the cache for a whole domain, no.

或者如果我们需要编写一个例程来逐一纠正它们,那么实现这一目标的最佳方法是什么?

or if we need to write a routine to correct them one by one, what would be the best way to achieve this?

通过向以下地点发出POST请求,可以重新获取一个开放图谱URL:

You can get an Open Graph URL re-scraped by making a POST request to:

https://graph.facebook.com/?id=<URL>&scrape=true&access_token=<app_access_token>

因此,您必须循环处理300个对象.但是不要做得太快,否则,根据FB开发人员小组中最近进行的一次讨论,应该会很好地解决这个问题,那就是您可能会达到应用程序速率限制-尝试在请求之间留出几秒钟的时间. (并且不要忘记在<URL>值插入到API请求URL中之前对其进行正确的URL编码.)

So you’ll have to do that in a loop for your 300 objects. But don’t do it too fast, otherwise you might hit your app rate limit – try to leave a few seconds between the requests, according to a recent discussion in the FB developers group that should work fine. (And don’t forget to URL-encode the <URL> value properly before inserting it into the API request URL.)

这篇关于Facebook调试器:清除整个网站缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆