【问题标题】:Facebook share button only showing www.example.comFacebook 分享按钮仅显示 www.example.com
【发布时间】:2014-10-17 07:50:17
【问题描述】:

我在我的网站上添加了 Facebook 的“赞”和“分享”按钮。当我单击“共享”时,我会看到通常的弹出窗口提示输入消息。但是,在下面的预填充内容区域中,它只写了

www.example.com

www.myurl.com

我添加了以下内容,但没有帮助:

<meta property="og:type" content="website" />
<meta property="og:title" content="Hello" />
<meta property="og:site_title" content="website" />
<meta property="og:description" content="Sample text"/>
<meta property="og:utl" content="www.mysite.com"/>

我已经尝试过使用和不使用 JS SDK。我也尝试过 iFrame 选项。

<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mysite.com&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=21&amp;appId=1111111111" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe> 

我做错了什么?为什么描述字段中有“example.com”?

【问题讨论】:

  • Facebook 的调试工具 (developers.facebook.com/tools/debug) 会为您共享的 URL 提取什么?
  • 它显示了同样的东西。它还说og:title www.example.com,这是不正确的。当我查看我网站的来源时,它是&lt;meta property="og:title" content="Hello" /&gt;

标签: javascript html facebook facebook-graph-api


【解决方案1】:

看起来 Facebook 需要一段时间才能索引更改。我不得不等待大约一个小时,但现在它可以工作了。这三个元标记似乎控制着内容:

<meta property="og:title" content="Hello" />
<meta property="og:site_title" content="website" />
<meta property="og:description" content="Sample text"/>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-08
    相关资源
    最近更新 更多