Business Process Modeling - BTMSoftwareSolutions.com

Monday, August 31, 2009

How to Add Twitter Post for your Blog

I recently updated my Blogger 'Layout' to include a Twitter Icon to allow readers the ability to post my blog on Twitter.  If the reader is already logged into Twitter, the Blog title and Blogger Twitter Account account is automatically entered into the Twitter 'What Are You Doing?' text area.  I updated the code to simply open Twitter in a new window instead of in the same window as the blog post.  I also had to find a twitter image I wanted to use and update the code to point to this image.  Since I use Microsoft Office Live for my Web Site, I just stored the image in the images gallery within Microsoft Office Live and then referenced that location in the image src attribute.  Finally I added the text 'Tweet Me!'.  The code is below.

<a expr:href=""http://twitter.com/home?status=Reading " + data:post.title + " @BTM_SS " + data:post.url" href="http://www.blogger.com/" target="_blank" title="Tweet it on Twitter"><img alt="Tweet This" src="http://btmsoftwaresolutions.com/images/twitter.png" />Tweet Me!</a>

Modify the code above for your specific information:
  1. update BTM_SS with your Twitter ID
  2. Change the following text to whatever you want
    • Reading
    • Tweet it on Twitter
    • Tweet This
    • Tweet Me!
    • replace the src location to a location of your image (even if you do not want a web-site, you can get a free Microsoft Office Live Web-site account and store the image there)
  3. Remove target='_blank' if you do not want twitter to open in a new window
To add this code to you blog, follow these simple steps:
  1. Log in to your blogger account
  2. Choose Layout
  3. Click 'Edit HTML'
  4. Check the box 'Expand Widget Templates'
  5. Place code above after
    <div class='post-footer'>
Any questions, visit my web-site at http://btmsoftwaresolutions.com/ and contact me for assistance.

1 comment:

  1. Hello

    Thanks. Very nice post. I have also an account in twitter and i have also created a blog. Your blog's all posts are very nice.


    Computer Systems Technician

    ReplyDelete