在 Facebook 上分享 link 会显示错误的图片
sharing a link on facebook displays the wrong image
我在 Facebook 上分享链接时遇到问题,它多次显示错误的图像,有时它使用这样的代码显示正确的图像
<meta property="og:title" content="webpage title" />
<meta property="og:url" content="http://www.domain.com/webpage_url.php?id=17515278817738945084phb">
<meta property="fb:app_id" content="app id here"/>
<meta property="og:type" content="website" />
<meta property="og:image" content="http://www.domain.com/large/image.jpg" />
调试页面时我得到了这个
The 'og:type' property is required, but not present.
此图片为 1000*317 像素,但仍未显示。我网站的所有链接都会发生这种情况。我必须转到 url 调试器并清除缓存,这样 facebook 才能获得正确的图像。那么如何解决这个问题,让facebook直接显示正确的图片呢?
[更新]
使用 facebook 调试器我收到此通知
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://www.domain.com/gallery1/01234.jpg' will
be used instead.
但是 og:image 设置正确,图像大小大于 200*200,Facebook 在清除 Facebook 缓存后显示正确的图像,尽管它一直显示此通知
尝试指向您的索引文件。例如 www.yourdomain.com/index.php 使用 facebook 对象调试器时。它为我修复了 og:name 错误。
我在 Facebook 上分享链接时遇到问题,它多次显示错误的图像,有时它使用这样的代码显示正确的图像
<meta property="og:title" content="webpage title" />
<meta property="og:url" content="http://www.domain.com/webpage_url.php?id=17515278817738945084phb">
<meta property="fb:app_id" content="app id here"/>
<meta property="og:type" content="website" />
<meta property="og:image" content="http://www.domain.com/large/image.jpg" />
调试页面时我得到了这个
The 'og:type' property is required, but not present.
此图片为 1000*317 像素,但仍未显示。我网站的所有链接都会发生这种情况。我必须转到 url 调试器并清除缓存,这样 facebook 才能获得正确的图像。那么如何解决这个问题,让facebook直接显示正确的图片呢? [更新] 使用 facebook 调试器我收到此通知
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://www.domain.com/gallery1/01234.jpg' will
be used instead.
但是 og:image 设置正确,图像大小大于 200*200,Facebook 在清除 Facebook 缓存后显示正确的图像,尽管它一直显示此通知
尝试指向您的索引文件。例如 www.yourdomain.com/index.php 使用 facebook 对象调试器时。它为我修复了 og:name 错误。