gpt4 book ai didi

Facebook 开放图 og :image issue (empty image at facebook share)

转载 作者:行者123 更新时间:2023-12-02 04:42:50 36 4
gpt4 key购买 nike

我坚持这个并寻找新的想法。我正在用 blogger.com 平台帮助一个 friend 写博客。问题:该博客的 Facebook 分享提供了空图像或“铅笔”图标的损坏图像。

我尝试了以下方法:

  1. 阅读开发者 Facebook 网站上的最佳实践

  2. 已验证的图片为推荐尺寸 (600x314)

  3. 定义了宽度和高度的元标签。

  4. 使用 Facebook 调试器工具获取新的 scraper 数据 - 总是得到相同的错误:

    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 ... will be used instead. Consult...for more troubleshooting tips.

  5. 顺便说一下,在 Facebook 调试器工具中,我看到“基于原始标签,我们构建了以下开放图谱属性”部分确实为 og:image 显示了正确的图像,但是它以分层方式显示两次缩略图。

这是代码(位于 <head>..</head> 部分):

<!-- Added by Gadi to support default image for blog sharing -->
<meta property="og:title" content="BLOG HORUT" />
<meta property="og:image" content="http://3.bp.blogspot.com/-rk2zwtg7_Vc/VuR2Xs9G5cI/AAAAAAAAAS0/uEJWZcyZcpQZhjUrIUiAR0gsyCfgdSSfw/s1600-r/cover4.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="314" />

最佳答案

我遇到了类似的问题,服务器的 og:image 标签指向一个安全的子域,该子域实际上是 CDN 服务器的镜像,

<meta property="og:image" content="https://subdomain.pathToImage.jpg" />
<meta property="og:image_secure" content="https://subdomain.pathToImage.jpg" />

FB 有一个 debugging tool这使您可以看到 FB 在尝试拉取图像时遇到的错误。

在我的例子中,子域没有在 HTTPS 协议(protocol)使用的 SSL 证书下注册。因此 FB 出现以下错误,

Curl Error : SSL_CACERT SSL certificate problem: unable to get local issuer certificate

关于Facebook 开放图 og :image issue (empty image at facebook share),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35963248/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com