profile for Gajendra D Ambi on Stack Exchange, a network of free, community-driven Q&A sites

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
2.click 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='http://twitter.com/share'>Tweet</a>
<script src='http://platform.twitter.com/widgets.js' type='text/javascript'></script>
</div>
</b:if>
<a class='twitter-follow-button' href='http://twitter.com/MrAmbiG'>Follow @MrAmbiG</a>
<script src='http://platform.twitter.com/widgets.js' type='text/javascript'/>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
    <iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&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;'/>
    </b:if>

for more refer my source : http://www.helperblogger.com/2012/04/add-twitter-tweet-button-just-below-of.html

No comments:

Post a Comment