Wednesday, August 11, 2010

Awesome Twitter Buttons for Awesome Tumblr Blogs

Twitter is launching official Tweet buttons for your websites!

A little disclaimer: At time of post, there’s no official announcement from Twitter itself about these buttons, so Twitter could theoretically yank this. Also, the Mashable article I linked to above says that the ability to retweet does not work for all users, though I have no issues with it so I can’t verify that this is the case.

These are really nice buttons that I’ve already implemented on my website. I’ve taken the code I used on my Tumblr blog and posted it below for you to use on your own Tumblelog:

<script src="http://platform.twitter.com/widgets.js"
type="text/javascript"></script>
<div>
<a href="http://twitter.com/share" 
    class="twitter-share-button"
    data-url="{ShortURL}"
    data-via="@jimcloudman"
    data-text="{Title}:"
    data-related="{block:Tags}{Tag},{/block:Tags}"
    data-count="horizontal">Tweet
</a>
</div>

Just stick this right below the {body}, {quote}, {description} or {caption} in your Tumblr theme code blocks to place this button right below your content. Remember to change the via= to your own username, or I’ll be getting a lot of retweets for articles I didn’t write!