如何让 Facebook 调试器引用正确的 og:image?

How do I get Facebook debugger to reference the correct og:image?

当我使用 Facebook debugger 查看我的网站首页时,在 "Warnings That Should Be Fixed" 部分下,我遇到了一些不同的错误。但是,如果我按一次 "Fetch new scrape information" 按钮,那么在下一轮只剩下一个错误。

我目前正在尝试解决的错误是:

og:image could not be downloaded or is too small

og:image was not defined, could not be downloaded or was not big enough. Please define a chosen image using the og:image metatag, and use an image that's at least 200x200px and is accessible from Facebook. Image 'http://davegutteridge.com/+image/mizumushi_profile.jpg' will be used instead.

Facebook 似乎缓存了一张旧图片并正在显示该图片,尽管我已将其从我的服务器中删除。

我要显示的图片是this one。为了让它发挥作用,我试过删除 "exif" 数据,试过将其变成正方形(我的原始像素为 1200 x 600 像素),并确保它远高于 200 x 200 像素。我也尝试过多次刷新,并等待超过 24 小时以查看 Facebook 的缓存是否发生变化。第一次发现这个问题 48 小时后,调试器仍然显示错误图像。

如何让 Facebook 引用正确的图片?

确保您遵循规范:https://developers.facebook.com/docs/sharing/best-practices#images

方形图像不是一个好的选择,但我刚刚在调试器中对其进行了测试,它工作正常。顺便说一句,这些只是警告,不是错误。

我有一个类似的问题,图像设置 "correctly" 但调试器不接受它。所以我试了一下,发现我可以通过添加 og:image:widthog:image:height 来帮助调试器。 之后,立即拍摄了图像:) 这个过程称为预缓存,这里是它的引用;) https://developers.facebook.com/docs/sharing/best-practices#precaching

希望对您有所帮助!