簡體   English   中英

使用iframe文檔將Facebook像按鈕添加到我的標記中不起作用

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

我盡了最大的努力使它正常工作,但我做不到。

這就是我所做的。

  1. 按照https://developers.facebook.com/docs/plugins/like-button上的說明進行操作
  2. 將我的iframe標簽復制並粘貼到<body>內的test.html文件中。
  3. horiyang是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/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM