Sunday, May 27, 2012

Add a Facebook Like button, twitter follow and tweet button with one code for Blogger

This post is valid and working as of may 2012.
* Please switch from new look of blogger to old classic style temporarily.
The following gives you 2 features of facebook(like+comment) and 2 features of twitter (tweet+follow)
1.Go to your blog and click on design on the right hand top corner on edit html and put a check mark on expand widget templates.
3. ctrl+f and search for <data:post.body/>
Right below that line paste the following and save template and you will see the facebook like button+tweet+follow on twitter button all together.
(replace @MrAmbiG with your twitter handle)

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style='text-align:left;padding:5px 5px 5px 0;'>
<a class='twitter-share-button' data-count='horizontal' expr:data-text='data:post.title' expr:data-url='data:post.url' data-via='@MrAmbiG' data-related='' href=''>Tweet</a>
<script src='' type='text/javascript'></script>
<a class='twitter-follow-button' href=''>Follow @MrAmbiG</a>
<script src='' type='text/javascript'/>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
    <iframe allowTransparency='true' expr:src='&quot;; + data:post.url + &quot;&amp;send=false&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=35&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:35px;'/>

for more refer my source :