Thursday, August 12, 2010

How to Add the Official Retweet Button into Every Post of Your Blog

Twitter has come up with an official Retweet button, you might probably know that. There is an advantage to it: the link is shortened, but you get an idea of the exact location of the shared page, see Techie Buzz. That is the general idea, though it did not work that way in a tweet that I shared.


I found a way to add that button to this blog: it is right here, down every post.- if you want to know how to add the official Twitter Retweet Button into your blog so that it shows up under every post like it does here, here is how I did that. I am a total idiot when it comes to html, javascript etc., but if I can find a way to do it, so can you.

Thanks to Anshul Dudeja, I made a few changes to the script he provides in his page, added it to the HTML the way he says it should be done, and voila!

This is the script:
<div style="float: right;
margin-left: 10px;"> <a class="twitter-share-button"
data-count="none" data-via="yourtwittername" href="http://twitter.com/share">Tweet</a><script
src="http://platform.twitter.com/widgets.js" type="text/javascript"> </script>

Please replace your twitter name for "yourtwittername"

Compare this version with that given by Anshul Judeja, where the code is displayed better.

How this script should be added to the blog is at this page:  How Add Retweet Button to Blogger Blogs at Anshul Judeja.

If there is any better way, please let me know, and I'll adopt that.

No comments:

Post a Comment