Friday, November 05, 2010

Creating a Twitter Share Link

Creating links to share on twitter is done by a general link system, i.e., a simple link that opens in a new webpage on twitter with the text and link (to be shared) already in it and is interpreted as a ready-made tweet by twitter.


General syntax/format for a twitter share link is,



<a href="http://twitter.com/?status=[link text] - [address]">[Sharing text]</a>

Just replace "[link text]" by the text you want to appear on the tweet and "[address]" by the link of your website or anything you want to share. "[Sharing text]" can be replace by sentences like "share on twitter", "tweet it", etc. or any text you want to appear as a sharing link.

For example:


Input:






<a  href="http://twitter.com/?status=Ali's Blog - http://muhammadalikhansblog.blogspot.com">Click to share on twitter</a>


Output:

Click to share on twitter


Instead of using text, images are mostly used for sharing purposes with a "target" attribute.


No comments:

Post a Comment


Ali Khan Blogs is a Blog about Blogging and SEO Tips and Tricks for Newbie Bloggers