Create your own Click-To-Tweet and follow links

Sep 19, 2014 · 4 min read

If you have a Twitter button or widget on your website you are already using Twitter Web Intents. Also if you are using a third party service or plugin to create a Click-To-Tweet link on your website they most likely are created using Web Intents. But you don't have to use a Twitter widget or a service or plugin to create your own Web Intents. You can create them very easily by creating simple text (or image if you like) links on your blog posts, sidebar and more. The reason why you might want to consider using these "handmade" intents instead of using the widgets and plugins is that widgets and plugins have often a bad habit of slowing your website down and a third party service can stop working at any moment.

Create your own Click-To-Tweet and follow links -- Mervi Emilia

Creating a Twitter Web Intent may seem complicated at the first glance, at least if you aren't too familiar with the more technical aspects of web. However it's really easy and fast after you try it once. There are several different types of Web Intents: You can use them to Tweet or reply to a Tweet, ReTweet, favourite Tweet and of course follow or display a Twitter user. Creating a Web Intent is as easy as creating any link. Thus you can use these Intents very easily in your blog posts or sidebars and so forth.

First of all you don't have to load the Twitter's widgets JavaScript to make the Web Intents work. The Intents will work just fine without the script, they just don't open the pop-up windows. The examples below will open the pop-up because I have included the script on my site, but it's not a requirement. In case you cannot for a reason or another insert the the script to your site the Web Intents are still usable, only without the pop-up. If you do want these Intents to open a new pop-up you must include this in your website source:

<script type="text/javascript" async src="//"></script>

If you click my Twitter handle @merviemilia here you will be lead to a pop-up which shows my Twitter profile information and a couple of my latest Tweets. The page also includes a Follow button clicking which you can follow me. Here's how I inserted the follow link:

<a href="">@merviemilia</a>

As you can see it's a very simple address and the only funny stuff is the part where the chosen handle is called. You can replace my Twitter handle with any other (without @) and the link will load that profile instead. If you want to test this you can copy the url ( on the address bar a new browser tab or window and replace my handle with yours or any other you know. You will see how the profile information is changed by this small adjustment.

You can also create Click-To-Tweet links with Web Intents without using external services or plugins. For instance try clicking this link. It was created as follows:

<a href=" a Click-To-Tweet with Web Intents without using external services or plugins: via @merviemilia">clicking this link</a>

The text I wanted you to Tweet is inserted in the url after ?text=. You can as well copy that to the browser address bar and tweak the text. Do note if your blogging platform turns website urls into links automatically inserting a link in the text may break your Intent link. I also used in this a shortened to make the Tweet shorter.

I mentioned above you can also create a way to reply, RT or favourite Tweets with the Web Intents. Click this link and you can reply to my earlier Tweet. I inserted this link as follows:

<a href="">Click this link</a>

In this case the ID of the Tweet I wanted you to @reply was inserted to the url after ?in_reply_to=. The Tweet's ID is that long number sequence, which can be found from the url of a Tweet. The url of the Tweet used to this example is:

There are similar ways to RT and favourite a Tweet. Try clicking this link to RT that previous Tweet and this to fave it. These both links were created as follows:

<a href="">Try clicking this link</a> <a href="">this</a>

Easy as that! As mentioned above the Intents can be used without the JavaScript thus you can use these kinds of links on for instance in your newsletters.

Build your influence with my free audio training

Learn how to reach the right people and make them crave for your knowledge, products, and ideas.

Start now

Free download

Thank you for reading Create your own Click-To-Tweet and follow links. What did you think? Do share this with your followers and friends: