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

By -

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="" type="text/javascript">

For Compact sized button, use these codes.

retweet small button

<script type="text/javascript">
tweetmeme_style = "compact";
<script type="text/javascript" src=""></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<<<<


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<<<<


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.

Soumya is the admin and founder of Techcular. He loves to discover and learn new things on Internet. You can find him writing on his personal blog few times.

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

  1. @ 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.

  2. 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 :)

    • 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.

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

  4. 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.

  5. 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.

  6. 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

  7. 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?


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

    <pre><code>tweetmeme_url = '<data:post.url/>';</code></pre>

  9. 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?


  10. 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?

    • 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.

      • Thanks, but that isn't quite it. The retweet is supposed to read

        "post title | blog title…"

        My retweet only reads

        "| blog title…"

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

          • 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

              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

            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?

  11. 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!

    • 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.

  12. 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

  13. 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 😉

  14. william doust

    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.

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

  15. 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

  16. 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?

  17. 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 ?


    I'm adding this scirpt:

    tweetmeme_url = '';


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

What is 12 + 7 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)