Sunday, April 4, 2010

How to Retweet Your Blog Posts

Here's how I got the "Retweet" button at the bottom of my blog posts. It uses the TweetMeme service and links back to the specific post, not the entire blog. It's loosely based on the coding found on the TweetMeme website. This should work with any Blogspot blog. There is a separate link for a Wordpress plugin.

• First, here's the code as I used it:

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

You will need to update YourTwitterName on the 3rd line. It will appear as RT @YourTwitterName.

• Now, here's how to put this code into your blog (Blogger/Blogspot only):

Open your blog, go to CUSTOMIZE, select the LAYOUT tab and click on EDIT HTML.
It's a good idea to use the link to DOWNLOAD FULL TEMPLATE and save it for a backup.
Under EDIT TEMPLATE, click the ballot box to EXPAND WIDGET TEMPLATES.

Do a search (Control F) for:
<b:if cond='data:post.hasJumpLink'>
Paste your code directly above this line.
Click SAVE TEMPLATE and you're done.

2 comments:

  1. That looks pretty easy to set up, I'll have to try it out later this week on my blogs. I'm planning on updating my layouts sometime soon anyways.

    Thanks for sharing. :)

    ReplyDelete