正如您在此图片中看到的那样
当图像更改时,Facebook仍可正确加载它(请参阅og:image列),但在实际的帖子中创建的图像(请参阅悬浮文本,来自 https: //fbexternal-a.akamaihd/safe_image.php )似乎被缓存。我发现通过添加一个虚拟参数来改变URL是有用的(如果需要,我们可以这样做),但是如果有办法强制Facebook刷新缓存的图像,那会更好。这样的一个电话或方法是否存在?
在类似的问题中,我听说过POST呼叫到
graph.facebook/?id= [ID]& scrape = true可以重新生成数据,但是我一直不成功(只有在对象是自托管的情况下才可以查看数据,是否正确?)。
还有一些关于在URL中添加fbrefresh = [ANYTHING]的东西,但这听起来就像添加一个虚拟参数。
此外,使用调试器似乎也没有任何作用。我进入了尝试:
- developers.facebook/tools/debug/og/object?q= [ID] - developers.facebook/tools/debug/og/object?q=[ID]&refresh=[ANYTHING] - http://developers.facebook / tools / debug / og / object?q = [Image URL] - developers.facebook/tools/debug/og/object?q=[Image URL]& refresh = [ANYTHING]另外
- graph.facebook/?id=[ID]&scrape=true全部无效。
最后,有没有人知道缓存是否正常刷新?或者预期图像将永远持续吗?
解决方案此文档说:
更新对象 当一个动作被发布,或者一个Like按钮指向被点击的对象时,Facebook将刮擦对象的HTML页面并读取元标记。对象scrape也发生在以下情况下: 对象URL在Object Debugger中输入第一次刮擦后每7天当应用程序触发使用API端点的Scrape 这个Graph API端点只是一个调用: POST /?id = {object-instance-id或object-url}& scrape = true当你这样做 scrape = true 到og:url参数,并删除本网站上的所有og参数。因此,请确保此页面(og:url)具有适当的og:image元标记与新的图像url。
如果更新图像,您必须重命名它(更新og:image url)否则Facebook不知道你有一个新的图像。
I have several objects hosted by Facebook that are posted to users' activity logs. The URL for the image is pointed to our content delivery solution, which redirects to a versioned image. This means that the URL can stay constant, but the image might change.
As you can see in this image
when the image changes, Facebook can still load it correctly (see the og:image column), but the image created in the actual post (see the hover text, which comes from fbexternal-a.akamaihd/safe_image.php) seems to be cached. I have found that changing the URL by adding a dummy parameter works (and we can do that if necessary), but if there's a way to force Facebook to refresh its cached image, that would be better. Does such a call or method exist?
In similar questions, I have heard that POST calls to
graph.facebook/?id=[ID]&scrape=truecan rescrape the data, but I have been unsuccessful with that call (it appears to only scrape the data if the object is self-hosted, is that right?).
There was also something about adding fbrefresh=[ANYTHING] to the URL, but it sounds like that is equivalent to adding a dummy parameter.
Also, using the debugger does not seem to do anything either. I have entered tried:
- developers.facebook/tools/debug/og/object?q=[ID] - developers.facebook/tools/debug/og/object?q=[ID]&refresh=[ANYTHING] - developers.facebook/tools/debug/og/object?q=[Image URL] - developers.facebook/tools/debug/og/object?q=[Image URL]&refresh=[ANYTHING]Also
- graph.facebook/?id=[ID]&scrape=trueAll to no avail.
Lastly, does anyone know if/when the cache might be refresh normally? Or would it be expected that the image persists forever?
解决方案This document says:
Updating Objects When an action is published, or a Like button pointing to the object clicked, Facebook will 'scrape' the HTML page of the object and read the meta tags. The object scrape also occurs when: The object URL is input in the Object Debugger Every 7 days after the first scrape When an app triggers a scrape using an API endpoint This Graph API endpoint is simply a call to: POST /?id={object-instance-id or object-url}&scrape=trueWhen you do this scrape=true thing, facebook will go to the og:url parameter and scrape all og parameters on this site. So make sure that this page (og:url) has the appropriate og:image meta tag with the new image url.
If you update the image, you've to rename it (update og:image url) otherwise facebook doesn't know that you've a new image.
更多推荐
我可以强制刷新一个Facebook对象的图像URL吗?
发布评论