3/26/2012

在Blogger加入各種分享按鈕語法(FB,GOOGLE+1)


若要在自己的Blogger內頁加上各種語法或廣告


登入 Blogger 的控制台 後,進入「版面配置」的「修改HTML」,記得勾選「展開小裝置範本」,然後找到下面這一行: 


<data:post.body/>


只要將你想要擺放的語法放在這一行的前面或後面
就會呈現在文章標題的前面或後面了





一般我們會想放FACEBOOK的讚,LIKE,或分享,以及GOOGLE+1
當然也有些人,會想在文章前後放上廣告,都適用~


1FACEBOOK的讚語法:

<script>
document.write(&#39;&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=<data:post.url/>&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=verdana&amp;colorscheme=light&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; allowTransparency=&quot;true&quot; style=&quot;border:none; overflow:hidden; width:450px; height:65px&quot;&gt;&lt;/iframe&gt;&#39;);
</script>



2FACEBOOK的分享語法:

<a expr:href='&quot;http://www.facebook.com/sharer.php?u=&quot; + data:post.url + &quot;&amp;t=&quot; + data:post.title' name='fb_share' type='button_count'>分享本篇文章</a>
<script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'/>


3GOOGLE+1的語法:
<g:plusone></g:plusone>






以上三個按鈕語法加入後~如下圖

分享本篇文章

沒有留言:

LinkWithin

Related Posts Plugin for WordPress, Blogger...