【问题标题】:og:image reads the image url but does not show the thumbnailog:image 读取图像 url 但不显示缩略图
【发布时间】:2012-02-13 17:14:25
【问题描述】:

我使用 iFrame 为网站添加了一个赞按钮,并添加了 og 元标记。在 Facebook 调试工具中查看时,它不会显示任何错误并显示来自网站的所有元数据。但是没有显示缩略图预览。 see the Facebook debug output

  • 当我单击缩略图链接时,它会转到正确的图像并正确显示。 * 该域只是一个非安全域。
  • 我使用的图像是 100X75

http://graph.facebook.com/10150536591853797

以下元标记已包含在文件中。

<meta property="og:site_name" content="パチカメ" />
<meta property="og:locale" content="ja_JP" />
<meta property="fb:app_id" content="297487356974821" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.pachi-cam.jp/artist/profile.php?artist_id=140" />
<meta property="og:title" content="Dr.ゆに さんのギャラリー" />
<meta property="og:description" content="こんにちわ " />
<meta property="og:image" content="http://www.pachi-cam.jp/upload/files/140/23203/thumb_S_phpapCLQi.jpg" />

iFrame 代码:

<iframe src="//www.facebook.com/plugins/like.php?href=http://www.pachi-cam.jp/artist/profile.php?artist_id=141&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

【问题讨论】:

    标签: php facebook facebook-like


    【解决方案1】:

    看到这个答案:og:image ignored when sharing link, although accepted in linter - 这可能不是那个海报的问题,但这是我看到的og:images 没有正确嵌入的最常见原因

    {编辑} 看起来您的服务器正在拒绝该请求:

    curl -A "facebookexternalhit/1.1" -i 'http://www.pachi-cam.jp/upload/files/140/23203/thumb_S_phpapCLQi.jpg'
    
    HTTP/1.1 403 Forbidden
    Date: Mon, 13 Feb 2012 09:13:59 GMT
    Server: Apache/2.2.21 (EL)
    Content-Length: 324
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    

    【讨论】:

    • 在那里编辑了答案,我明白为什么它在你的情况下不起作用(至少对我来说)
    【解决方案2】:

    您可能会因为元标记中的 id=140 而 iframe 代码中的 id=141 而混淆 Facebook。

    【讨论】:

    • DMCS 感谢您的回复。尝试更改 ID,但仍然不显示缩略图。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-03-24
    • 1970-01-01
    • 1970-01-01
    • 2011-05-05
    • 2012-04-18
    • 2016-06-13
    • 1970-01-01
    相关资源
    最近更新 更多