我无法让 Facebook 识别 og:image 标签。它似乎正确地抓取了,但随后我收到了这个警告:
og:image could not be downloaded or is too small Provided og:image could not be downloaded or is not big enough. Please use an image that's at least 200x200px and is accessible from Facebook. Image 'http://ericrovtar.com/images/logo/800x200_reverse.png' will be used instead.
查看来自调试器的原始数据:
"image": [
{
"height": 1080,
"url": "http://ericrovtar.com/images/posts/fitz-simmons.jpg",
"width": 1920
}
],
它显然看到了正确的高度和宽度,并且它们满足 Facebook 的最低要求,所以我不确定它在提示什么。
如果有人能帮我解决这个问题,那就太好了。
最佳答案
我为图像添加了额外的元数据,列在这里:http://ogp.me/那奏效了。具体来说:
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
但是当我的图像是 366x363 时它最初不起作用,即使那是最小值。 200x200。我不得不将图像的大小加倍,然后就可以了。去 FB 的好方法!
关于Facebook 无法识别元数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23834389/