How to add Twitter (Retweet) Button to Every Blogger Posts



There a lots of ways and platforms to promote your blog in order to get traffic. But the first blog promotion starts from your blog posts itself. You should design your posts with all necessary blogger social bookmarking icons, so that people can spread it’s reach using different web services. There are different buttons that you can use on your blogger posts like Digg, Yahoo! Buzz, StumbleUpon, Mixx, Twitter etc. Here I’m going to show you the tutorial to add a Twitter or Retweet button to your blogger blog posts. Yes, you can use Twitter to promote your blog and you will not only get some followers to your Twitter account but will also get decent traffic to your blog.

If someone likes your post, he can click on the Retweet button to post the topic with it’s URL in his twitter account and all his followers would get notified about this. This is the simple yet effective way to promote your blog posts on twitter. There are two types of Retweet buttons available to insert in your blogger posts. One is the most common sized and another one is the small sized. Look at the below screenshot.

different twitter buttons for blogger posts

How to Add Twitter (Retweet) Button to Blogger Posts

Login to your blogger dashboard.

Navigate to Layout >> Edit HTML >> Expand Widget Templates

Search for <data:post.body/> and paste the following codes just before or after it. Adding the code before <data:post.body/> will show the Retweet button on the top of your post while adding after <data:post.body/> will show the Rettweet button on the bottom of your post.

For Digg like Button, use the following code.

retweet button

<script type="text/javascript">
tweetmeme_url = &#39;<data:post.url/>&#39;;
</script>Retweet this button on every post blogger
<script src="http://tweetmeme.com/i/scripts/button.js" type="text/javascript">
</script>

For Compact sized button, use these codes.

retweet small button

<script type="text/javascript">
tweetmeme_style = "compact";
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Now if you want align it to the right, use the above code in the following way.

<div style='float:right; margin-left:10px;'>

>>>>Retweet Button Code Here<<<<

</div>

Similarly if you want to align it to the left, use the above codes in this way.

<div style='float:right; margin-left:10px;'>

>>>>Retweet Button Code Here<<<<

</div>

You are done now. Now all your blogger posts will have a Twitter button or Retweet button. If you face any problems, use the below comments section to seek help.

Related Posts Plugin for WordPress, Blogger...

Related posts:

  1. Digg Button Code to Show Digg icon in Blogger Posts
  2. How to Add Google Buzz This Button to Blogger/Blogspot Blog Posts
  3. How To Add Yahoo Smileys In Blogger Posts
  4. Show Your Twitter Updates On Blogger/Blogspot
  5. Add Related Posts Widget in Blogger / Blogspot Blogs
  6. Add Signature Below Blog Posts on Blogger / Blogspot
  7. Show Post & Comments Count in Blogger / Blogspot Blogs
  8. How To Create Recent Posts Widget For Blogger Blogs
  9. Show Adsense Ads inside Blogger Posts, Wrapped with Post Text
  10. How To Show Comments On Blogger / Blogspot Posts

Filed in: Blogspot
Tagged with:

Comments (60)

Trackback URL | Comments RSS Feed

  1. Mohan says:

    Thanks dear, you explain at easy way

  2. I put up the retweet button at the end of my posts ( http://joblounge.blogspot.com ). Is there a way to get the button to be flush left after each post, instead of immediately after the last word in the post?

    BTW, thank you for the instructions. I retweeted them. :)

  3. Bapun says:

    @ Susan : Such a lovely blog there. Impressive :)

    You can add a < br / > (without space) tag before the twitter code. Adding a line break will force the button to create a new line and get aligned to left. However, if you want to get the most out of this button, try showing it on the top of the post.

  4. That worked. Thank you.

    It seems the retweet goes to the tweetmeme site, not to a person's followers. Is that right?

    Again, thank you!

  5. IsHu says:

    Thanks a lot working good in my blog

    Thanks for making it in simple code

  6. Excel Matic says:

    It works great!! I was actually looking for this for some time now.

    Thanks!

  7. Bilal says:

    Great work …. i was always using the the ending up with twitter widget on my blog which looked very erroneous..but now i am on 9th cloud :)

  8. Osman says:

    Great post. Very helpful.

    How do you add "RT @username"?

    • Hi. I’m not really an expert in this kind of thing, but I think I know how to add “RT @username” I’ve tried a thousand times, and this is the code I came up with:

      tweetmeme_url = '';
      tweetmeme_source = ‘username’;

      This works for me. Just put this code before OR after and I guarantee yours will work fine too.

      Just thought I should help, even though this comment had been posted over a year ago.

      • Or in other words (since I just realized that I can’t put up a code in here), you can just add

        tweetmeme_source = ‘username’;

        right after

        tweetmeme_url = ”

        in the aforementioned code. Just as simple as that.

  9. Osman says:

    I have 3 in my template. Should I add the code in front of each or just the first one?

    Thanks again.

  10. Bapun says:

    @ Osman : If you are talking about <data:post.body/> code, then just check your template again. All templates have this code only once.

  11. Thank you. I'd been trying to do that all night, then found your clear instructions!

  12. Sozo says:

    Did not work well at all. The functionality was there but it counts all the "retweets" and gives the same number for every post. Not at all how it's suppose to work.

  13. Leah says:

    This is a great site. Thanks for the information on how to add retweet this button to blogger.

  14. Bapun says:

    @ Sozo : Follow all the steps carefully and it should work normally.

  15. It Isnt working friend.

    Tried Many times =(

  16. Thanks very much, I like the compact style

  17. Deva84 says:

    Hi! I wanted to put retweet button on left side on my blog but… I have a problem coz I see that your left and right code look the same. Could you help me with this?

    Maybe would be better if you could email me.

  18. raoul says:

    You explained it quickly and it is very easy to apply. Good job!

Leave a Reply

Back to Top