Tweet button / link without javascript – HTML only

Twitter buttonIf you’ve ever wanted to include a ‘Tweet’ button or link but didn’t want to use the popular Tweet Button code from Twitter (it uses a remote javascript function), there is an alternate approved method called “Intents”. This function works great for instances when simple HTML is preferred (emails, pages geared toward older or simple browsers, etc.). However it doesn’t provide extras like showing how many have used the button or creating the image automatically. So how does it work?

Using Twitter’s Web Intents, you can create links like below:

<a href="http://twitter.com/intent/tweet?url=http://chrisbitting.com
&text=Checkout this awesome blog.&via=chrisbitting&hashtags=twitter"
 title="Tweet" target="_blank">Tweet</a>

Which looks like: Tweet

No Javascript!

Be sure to check the documentation for more options and details: https://dev.twitter.com/docs/intents

Tweet button / link without javascript – HTML only

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s