gpt4 book ai didi

Facebook 分享故事图片第一次没有出现

转载 作者:行者123 更新时间:2023-12-01 04:53:46 27 4
gpt4 key购买 nike

我尝试分享文章或网页,但故事在第一次分享时不显示图像,但当我下次分享时,图像出现了。

在 FB Debugger 中也检查过,相同的 result.image 不是第一次出现,下次会出现。

<html class="no-js" lang="ar" dir="rtl" data-ng-app="mApp" xmlns:fb="http://ogp.me/ns/fb#">
<meta property="og:title" content="mytitle"/>
<meta property="og:url" content="http://mytest.com"/>
<meta property="og:image" content="http://mytest.com/1-773128.jpg"/>
<meta property="og:description" content="ffff2024"/>
<meta property="og:site_name" content="ggggggg"/>
<meta property="og:type" content="ARTICLE"/>
<meta property="fb:app_id" content="2444444444444"/>

最佳答案

更新

此 iframe 解决方案不再有效!从昨天 2017 年 2 月 6 日开始工作。Facebook 刚刚将 X-Frame-Options 设置为 DENY 因此您无法在 iFrame 中加载共享者 url。我正在寻找另一种解决方法。


我努力为这个 facebook 错误找到解决方案(添加 og:image:width 和 og:image:height 是不够的)。

最后我想出了一个可行的解决方法:我在页脚中添加了一个带有共享器链接的 Conceal iFrame;通过这种方式,Facebook 爬虫会在页面加载后检查页面,当您第一次点击 facebbok 分享按钮时,您可以看到分享的图片!

例子:

<iframe style="width: 0px; height: 0px; margin: 0px; padding: 0px;" src="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.example.com"></iframe>

关于Facebook 分享故事图片第一次没有出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32505477/

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