How to add retweet button inside the blogger post

Why retweet?

You may ask why i should add retweet button inside my post. It is one of the ways to get some good traffic to your blog. Whenever a visitor visit your blog and finds your post interesting then he will definitely retweet so that his followers can see it and retweet if they find it useful.As far as i know most of the people in this world use twitter than other social networking sites . There is 99% chance of getting decent traffic to your post if you add a retweet button

What do you need ?

  • A blog
  • Twitter account

How to add retweet button ?

  • Login in to your Dashboard > Select blog
  • Go to Layout > Edit HTML
  • Now copy the below code and paste it above or below <data:post.body/>. Dont forget replace ID with your twitter id

<script type='text/javascript'>
tweetmeme_url = &#39;<data:post.url/>&#39;;
tweetmeme_source = &#39;ID&#39;;
</script>
<script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/>

1.If u want to place the retweet at the top left or top right then paste the code above <data:post.body>

a) Top right
<div id='retweet' style='float:right;padding:4px;'>
<script type='text/javascript'>
tweetmeme_url = &#39;<data:post.url/>&#39;;
tweetmeme_source = &#39;ID&#39;;
</script>
<script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/>
</div>

b) Top Left
<div id='retweet' style='float:left;padding:4px;'>
<script type='text/javascript'>
tweetmeme_url = &#39;<data:post.url/>&#39;;
tweetmeme_source = &#39;ID&#39;;
</script>
<script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/>
</div>

2.If u want to place the retweet at the bottom left or bottom right then paste the code below <data:post.body/>

a) Bottom Left
<div id='retweet' style='float:left;padding:4px;'>
<script type='text/javascript'>
tweetmeme_url = &#39;<data:post.url/>&#39;;
tweetmeme_source = &#39;ID&#39;;
</script>
<script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/>
</div>

b) Bottom Right
<div id='retweet' style='float:right;padding:4px;'>
<script type='text/javascript'>
tweetmeme_url = &#39;<data:post.url/>&#39;;
tweetmeme_source = &#39;ID&#39;;
</script>
<script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/>
</div>

Feel free to contact me if you want any help regarding the placement of the button in your blog

Share on Facebook



Comments

  1. orkutplaza.com says:

    Thanks for this useful post =)

  2. I have 10 posts with "read more" enabled posts on every page of my blog. AFter adding retweet button code to my template, retweet button appears on front page on all my 10 posts. Is there a way to get it done, so that retweet button would appear only on each post after visiting full post (by visiting full post via "read more" link)?
    Here is how it currently looks this on my blog and it is annoying that the button is visible on home page!
    http://www.pcterritory.net.

    Please, your advice

  3. Yes tomaz ,you can do it by changing the position of the script .If you are using a automatic read more tweak for your blog

    <b:if cond='data:blog.pageType != "item"'>

    <div expr:id='"summary" + data:post.id'><data:post.body/></div>
    <script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");
    </script> <span class='rmlink' style='float:right;padding-top:20px;'><a expr:href='data:post.url'> read more "<data:post.title/>"</a></span>

    </b:if>
    <b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>

    There will be two <data:post.body/> tags in the above tweak.

    Find the second <data:post.body/> tag and place your retweet script above or below the tag.

    ………………………………………

    After changing the position of the script your code should look like

    <b:if cond='data:blog.pageType != "item"'>

    <div expr:id='"summary" + data:post.id'><data:post.body/></div>
    <script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");
    </script> <span class='rmlink' style='float:right;padding-top:20px;'><a expr:href='data:post.url'> read more "<data:post.title/>"</a></span>

    </b:if>
    <b:if cond='data:blog.pageType == "item"'>

    RETWEET SCRIPT

    <data:post.body/>

    RETWEET SCRIPT

    </b:if>

    I am sure this will solve your problem.

    Regards
    Kannan

Speak Your Mind

*