How to add a customised Re Tweet button to your blog





So Tweetmeme offer a great piece of html to put on your blog posts so that a button appears that readers can easily click to tweet your message to the world... to the world! Any respectable Search Engine Optimisation expert will tell you you need to use social media to get anywhere these days. I'm not one of them, I'm just a hack and I'm still telling you.....

Tweetmeme has the standard retweet button:

<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Or the Compact Button Version which makes the button small:

<script type="text/javascript">
tweetmeme_style = 'compact';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

However, when using this html, the Twitter account name that goes with the tweet is Tweetmeme's. Luckily, the good people that they are, they realised this is not what the masses want and have provided the following html coding to allow you to sub in your own twitter name:

<script type="text/javascript">
tweetmeme_url = 'http://yoururl.com';
tweetmeme_source = 'talktweetmeme';
</script>

<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>


So when users retweet this button, your twitter account is the one displayed. This is handy for tracking retweets as well as you can simply follow what happens on your own twitter account.

It's a pretty handy step, as the button the code produces is also nice and subtle and can be placed in most parts of a web page (e.g. to put it at the foot of a post in a Blogger template, copy the html to just below the html line "<div class='post-footer'>" in the 'Expand Widget Templates' section of Blogger).



BUT

There is always a but - you can't have the compact code with the own tweet code. You might say, "that's crap Jimmy Jangles!" Never fear, dear reader, there is a solution to customise the Re Tweet button:

What if you want the combine the compact html AND the your own twitter name AND have the page title displayed?

Then try this little mangle of html code I whipped up in the kitchen:

<script type='text/javascript'>
tweetmeme_style = &#39;compact&#39;; tweetmeme_source = &#39;jimmyjangles&#39;; </script> <script src='http://tweetmeme.com/i/scripts/button.js' type='text/javascript'/> <div/>




Make sure you substitute jimmyjangles with your own twitter name!
Does it work? Check out my experiments with this code at The Spaghetti Incident?

As above, I said I'm no SEO ace, but I've learnt a few things so I'm passing them on. Here's my Angels and Demons Guide to high page rankings in Google, proof that Search Engine Optimisation works and will some one please answer the question, What Would Matt Cutts Do?

Hey, if this post was useful, why don't you give it a Re Tweet?

No comments: