Home » , » How to add Retweet Button to Blogger

How to add Retweet Button to Blogger

Update: Twitter has now Released its own Retweet Buttons - So check it out at  Official Tweet Button from Twitter With Counter



How to add retweet button to Blogger ?


Twitter is getting more and more famous and so is retweet  Most of you might be knowing of both of this.Still i will give a brief into on both :P

Twitter – Twitter is  a free social networking site that enables users to send short notices of 140 characters. :P

Retweet – This one enables to repost some interesting tweets on twitter.The retweet button can act more like a tweet counter

Adding a retweet button will show a neat count of how many times,your post has been tweeted about,and will also allow your readers to retweet it


Retweet Button Style 1


retweet-button-for-blogger-style-1

Code for retweet button style 1 


<div style="float:right;padding:4px;">
<script type="text/javascript">
tweetmeme_url = '<data:post.canonicalUrl/>';
tweetmeme_source = 'your_twitter_user_name';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</div>



Retweet Button Style 2


retweet-button-for-blogger-style-2

Code for retweet button style 2 


<div style="float:left;padding:4px;">
<script type="text/javascript">
tweetmeme_url = '<data:post.canonicalUrl/>';
tweetmeme_source = 'your_twitter_user_name';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</div>



Retweet button Compact Style 1


compact-retweet-button-for-blogger-style-1

Code for compact button style 1




<div style="float:left;padding:4px;">
<script type="text/javascript">
tweetmeme_style = 'compact';
tweetmeme_url = '<data:post.canonicalUrl/>';
tweetmeme_source = 'your_twitter_user_name';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</div>



Retweet Button Compact Style 2


compact-retweet-button-for-blogger-style-2

Code for compact button style 2




<div style="float:right;padding:4px;">
<script type="text/javascript">
tweetmeme_style = 'compact';
tweetmeme_url = '<data:post.canonicalUrl/>';
tweetmeme_source = 'your_twitter_user_name';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</div>



How to install the Retweet Button on your blog?


1.Select any of these four retweet button styles,and copy the corresponding code into a text file.

2.Now in this code replace your_twitter_username with your actual twitter username

3.Now we have got the final retweet code.Now login to your blogger dashboard and navigate to Layout > Edit Html and expand the widget templates

4.Find this piece of code


<div class='post-header-line-1'/>

and immediately after that place our retweet code(from our text file).and you are done :)


If you were unable to find this code in your template,then look for the first occurance of


<data:post.body/>


and immediately before that, place our retweet code(from our text file)

5.Save the template.

Now you should have a  retweet button near each of your blog posts.




Retweet Button for Blogger classic Templates


This is not for the blogger XML templates that we normally use.If you are using a blogger classic template,these four code styles can't be directly used in your template.You will have to modify any of these four code styles for it to work on the classic template.In any of these four code styles change <data:post.canonicalUrl/> to <$BlogItemPermalinkUrl$>

Now you have got the code for the classic template!


Where to place the code for classic blogger template?


Place the code just above <$BlogItemBody$> and save the template.Now you should have the retweet buttons on your classic blog.



If you liked this post, why not help me by retweeting it.. :)



Additional Note: How to check the retweet count of any url?

To check the retweet count of any url,just go to this url in your browser. http://api.tweetmeme.com/imagebutton.gif?url=http://twitter.com .Make sure to replace http://twitter.com with the url whose retweet count you would like to know.
Source: http://www.bloggerplugins.org/2009/08/retweet-button-for-blogger.html

0 comments :

Post a Comment

 
Play : Agame | Y8 Games | Y3 Games
Copyright © 2011. Blogger Tips And Tricks 2012 - All Rights Reserved

Proudly powered by Blogger