【发布时间】: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&width&layout=button_count&action=like&show_faces=true&share=true&height=21&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,这是不正确的。当我查看我网站的来源时,它是<meta property="og:title" content="Hello" />
标签: javascript html facebook facebook-graph-api