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.

We will send you some more information related to How to add Twitter (Retweet) Button to Every Blogger Posts

Below are some more related articles to the topic:

Digg Button Code to Show Digg icon in Blogger Posts
How to Add Google Buzz This Button to Blogger/Blogspot Blog Posts
Show Your Twitter Updates On Blogger/Blogspot
How To Add Yahoo Smileys In Blogger Posts
Add Signature Below Blog Posts on Blogger / Blogspot

Tags: , , ,

55 Responses to “How to add Twitter (Retweet) Button to Every Blogger Posts”

  1. Mohan 17. Jun, 2009 at 4:07 pm #

    Thanks dear, you explain at easy way

  2. Susan Ireland 23. Jun, 2009 at 1:25 am #

    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 23. Jun, 2009 at 11:15 am #

    @ 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. Susan Ireland 24. Jun, 2009 at 5:23 am #

    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 14. Jul, 2009 at 3:50 pm #

    Thanks a lot working good in my blog

    Thanks for making it in simple code

  6. Excel Matic 14. Jul, 2009 at 7:04 pm #

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

    Thanks!

  7. Bilal 16. Jul, 2009 at 6:14 pm #

    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 22. Jul, 2009 at 7:59 pm #

    Great post. Very helpful.

    How do you add “RT @username”?

    • Hayley Morgan 25. Jul, 2010 at 2:28 pm #

      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.

      • Hayley Morgan 25. Jul, 2010 at 2:37 pm #

        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 22. Jul, 2009 at 8:01 pm #

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

    Thanks again.

  10. Bapun 22. Jul, 2009 at 10:00 pm #

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

  11. ThePekingOrder 10. Aug, 2009 at 6:28 pm #

    Many thanks!

  12. Welshcakes Limoncello 17. Aug, 2009 at 3:57 am #

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

  13. Sozo 21. Aug, 2009 at 2:53 pm #

    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.

  14. Leah 06. Sep, 2009 at 1:08 pm #

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

  15. Bapun 06. Sep, 2009 at 1:47 pm #

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

  16. WMgeek 09. Sep, 2009 at 5:17 pm #

    cool~nice share!!

  17. Rizwan Ibrahim 14. Sep, 2009 at 9:19 pm #

    It Isnt working friend.

    Tried Many times =(

  18. Free Blog Templates 23. Sep, 2009 at 10:14 am #

    Thanks very much, I like the compact style

  19. Deva84 25. Sep, 2009 at 4:22 pm #

    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.

  20. raoul 21. Oct, 2009 at 6:13 am #

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

  21. rajkumbh 04. Nov, 2009 at 4:27 pm #

    Thanks I was searching for it and find it on your site thanks again.

  22. ceejay 28. Dec, 2009 at 4:12 pm #

    thanks a lot your blog has done so much for my blogspot.
    i don’t know how to pay you but to say a BIG THANK YOU.
    keep the good work.

    my blog is all about online marketing and free ways to make money online

  23. ceejay 28. Dec, 2009 at 4:22 pm #

    good post but i thought you have to post your tweet on your twitter account.

  24. ATOzTOA 20. Jan, 2010 at 1:58 am #

    It works like a charm… thanks…

  25. johnreillymarbarace 21. Jan, 2010 at 4:26 am #

    the brief explanation was just great. i successfully installed it on my blog. thanks.

  26. Lee 22. Jan, 2010 at 8:13 am #

    Great trick .. I added it to my blogger

  27. himanshu 24. Jan, 2010 at 12:20 am #

    wen i installed d code the retweet buttons comes inside the post

  28. Oliver Helm 18. Feb, 2010 at 5:11 pm #

    Hi,

    Compact button looks grate, but its showing the results for the site, not individual posts (eg every post shows the same number).

    Can anyone offer any suggestions please?

    Ta!

  29. Bapun 18. Feb, 2010 at 5:22 pm #

    @ Oliver : Add the following piece of code just below the first line of the code:

    tweetmeme_url = &#39;<data:post.url/>&#39;;
  30. Maggie 19. Feb, 2010 at 10:27 am #

    managed to add it but keeps saying already retweeted and all the numbers are the same for each post

  31. Louise 26. Feb, 2010 at 3:57 am #

    your instructions were so easy and effective – thank you so much!

  32. Grafikmarka 29. Apr, 2010 at 4:06 am #

    Thanks for your clear instructions. I have put mine at the top of each post but need to make the line of type in my post line break; how do i do this?

    Thanks

  33. Grafikmarka 29. Apr, 2010 at 4:11 am #

    Never mind, i put a to fix the problem. Thanks again.

  34. Erik 05. May, 2010 at 3:37 pm #

    When I install this on my blog and click ‘retweet’, the tweet that is generated displays the name of my blog, instead of the name of the post. How can I fix this?

    • Bapun 05. May, 2010 at 3:45 pm #

      I guess you have to edit your blog template as you could have edited it to show your blog name instead of the actual post name as the page title.

      • Erik 05. May, 2010 at 4:21 pm #

        Thanks, but that isn’t quite it. The retweet is supposed to read
        “post title | blog title http://bit.ly/…

        My retweet only reads
        “| blog title http://bit.ly/…

        Since I am not fluent in html, what should I look for and edit to insert the “post title”?

        • Bapun 05. May, 2010 at 4:38 pm #

          Can you please provide the link to your blog so that I can try to find out the issue..

          • Erik 07. May, 2010 at 2:52 am #

            Thank you for your generous offer, great service! However, in the meantime I’ve got it figured out.

            Now, I’m very happy with my retweet button. Thanks a million!

            • michelle madden 01. Jul, 2010 at 4:50 pm #

              erik–
              can you tell me how you were able to fix this prob so i can try to fix it on my blog too?? are you able to get the retweet to be for that one post only and not for the whole blog? and are you able to set it up so that the retweet comes from the person retweeting and NOT from “tweetmeme”? thanks!!

          • michelle madden 01. Jul, 2010 at 5:16 pm #

            hi! i am having the same prob that erik had in the way that the name of the blog post is not showing up in the retweet only the name of my whole blog is showing up. any ideas?
            thx!

  35. David 05. May, 2010 at 10:46 pm #

    I was having trouble trying to add a twitter button or banner (or whatever works) to my blog post, without editing every single post (what is a enormous work). I’ve tried add ons, codes, etc. Nothing worked.

    Until I came here. Worked at the first try, I’ve added and aligned to right my twitter button, just following what Bapun said.

    Thanks a lot

    PS: I saw you added adsense between lines in your post. You covered this issue at your blog? (I’m new here)

    Thanks again!

    • Bapun 05. May, 2010 at 11:01 pm #

      Glad to know that this worked for you.

      The adsense ad within the post is being served by a WordPress plugin but there is a code for Blogger blogs that can be used to display ads in the middle of the post automatically. I will make a post on this soon.

  36. meh 07. May, 2010 at 11:44 pm #

    Hey,
    I did everything in your post but I keep getting a retweet button with a question mark and it redirects me to a tweetmeme page. What am I doing wrong?

    tweetmeme_url = '';
    Retweet this button on every post blogger

  37. meh 07. May, 2010 at 11:45 pm #

    I posted my code in my last comment, but apparentely it was ignored :\

  38. meh 08. May, 2010 at 12:05 am #

    Never mind, the explanation for the question mark problem is simple: the page has a lot of content, so I guess tweetmeme fails to retrieve the data it needs. I tried the button in a one-word post and it works perfectly.

    Thanks a lot for this code ;)

  39. william doust 13. May, 2010 at 4:59 pm #

    HiI would love to know about your floating toolbar – will you create a post for it? – would love to see one that you can put on the right hand side.

    • Bapun 13. May, 2010 at 5:27 pm #

      It’s a WordPress plugin that works on self-hosted wordpress blogs only. Unfortunately there is no hack for Blogger yet.

  40. hacker9 17. May, 2010 at 1:52 pm #

    finally added this on my blog,.. was searching for it on google,.. guess what ur blog was on the top of the list….thanks a lot for the share

  41. Valdazzar 17. May, 2010 at 11:06 pm #

    I ‘m not sure but I think that when I tried it it worked. Now I have 2 problems. The first is that the button appears to even to pages of my blogger, (which I don’t want that, I want only to new posts) and second question : What should I do to tweet the name of the post and not the name of my site?

  42. Ammar Haider 30. May, 2010 at 3:37 pm #

    Hey. Thanx for the info. It was really helpful.

  43. Okks 11. Jun, 2010 at 2:08 am #

    The retweet only display the name of my blog and the link to the article while it should show the name of the article too…

    What’s wrong ?

    What should i add to the retweet script ? Something like post title ? But how ?

    Thanks.

    I’m adding this scirpt:

    tweetmeme_url = ”;

    Thanks

  44. Swayam Das 20. Jun, 2010 at 10:59 am #

    Hey Buddy, can you prepare a code that will not show that retweet counter number! Just that retweet link will be fine! :)

    Cheerz!

  45. Pethum 21. Jun, 2010 at 4:03 pm #

    Short and sweet..Thank you dear..

Leave a Reply