From the mind of Jamie Huskisson: Nottingham freelance UK PHP, Magento, Wordpress developer

‘Share on Twitter’ link

Posted on January 20th, 2009 in ,

Twitter bird

Ever wanted to give your readers, or your client’s readers a chance to share the post quickly on Twitter?

The code is straight forward:

<a href=”http://twitter.com/home?status=Currently reading http://www.test.com/post-url” title=”Click to share this post on Twitter”>Share on Twitter</a>

If you’re using Wordpress and want to automate this, simply use the following to insert the link to the current post in the loop into your link:

<a href=”http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>” title=”Click to share this post on Twitter”>Share on Twitter</a>

Bookmark and Share

If you enjoyed this post:

Please take the time to leave a comment with any of your thoughts, follow me on Twitter or subscribe to my RSS Feed for automatic updates on all future posts.

There are 53 responses to this post so far

Feel free to use any of the following tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>