2016年11月21日 星期一

Like button of facebook in blogger

Add Like Button of facebook in blogger by using Blogger's Template




Test code:
//add code in Blogger Template
<b:if cond='data:blog.pageType == &quot;item&quot;'>//only show on contex in blogger
//like button for facebook
<iframe allowtransparency="true" frameborder="0" onload="this.src=&quot;http://www.facebook.com/plugins/like.php?locale=zh_TW&amp;href=http://&quot; + location.hostname + location.pathname + &quot;&amp;layout=button_count&amp;action=like&amp;colorscheme=light&amp;share=false&quot;; this.onload=&quot;&quot;;" scrolling="no" src="" style="height: 20px; width: 150px;"></iframe>
//like button for Google
<iframe allowTransparency='true' src='' style='width:150px; height:20px;' frameborder='0' scrolling='no' onload='this.src="https://plus.google.com/_/+1/fastbutton?url=http://" + location.hostname + location.pathname + "&amp;size=medium"; this.onload="";'></iframe>
</b:if>
Reference:
FB「讚」按鈕與 Google「+1」按鈕最簡單安全的安裝方式﹍可解決對齊問題


2. Like button from facebook:
    https://developers.facebook.com/docs/plugins/like-button
Reference: tutor:
    http://shujstars.blogspot.tw/2014/06/

video:
    https://m.youtube.com/watch?v=diQRc27HdQU
Share:

Related Posts:

0 意見:

張貼留言