使用 iframe 文档向我的标记添加 Facebook 喜欢按钮不起作用

Adding a Facebook like button to my markup using iframe document not working

本文关键字:Facebook 添加 喜欢 按钮 不起作用 iframe 文档 我的 使用      更新时间:2023-09-26

我尽我所能让它工作,但我做不到。

这就是我所做的。

  1. 按照 https://developers.facebook.com/docs/plugins/like-button 上的说明进行操作
  2. 将我的 iframe 标签复制并粘贴到我的测试.html文件中<body> 内。
  3. Horigang是Facebook的名字。

    <!DOCTYPE HTML>
    <html>
    <body>
    <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Ffacebook.com%2Fhoriyahng%2F&amp;width=200x200&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200x200px; height:80px;" allowTransparency="true"></iframe>
    </body>
    </html>
    

请在iframe标签中在//之前添加 https:喜欢这个

<iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Ffacebook.com%2Fhoriyahng%2F&amp;width=200&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:80px;" allowTransparency="true"></iframe>

这是您的盒子正在工作的小提琴链接,请检查它。 http://jsfiddle.net/u5Lgeg5e/