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="//platform.twitter.com/widgets.js"></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="https://twitter.com/intent/user?screen_name=merviemilia">@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 (https://twitter.com/intent/user?screen_name=merviemilia) 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="https://twitter.com/intent/tweet?text=Create a Click-To-Tweet with Web Intents without using external services or plugins: http://bit.ly/1uOtX51 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 bit.ly-link 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="https://twitter.com/intent/tweet?in_reply_to=512349135479902208">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: https://twitter.com/merviemilia/status/512349135479902208.

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="https://twitter.com/intent/retweet?tweet_id=512349135479902208">Try clicking this link</a> <a href="https://twitter.com/intent/favorite?tweet_id=512349135479902208">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.

Download my free Ultimate SEO Checklist. You will also receive exclusive weekly notes and other gifts.

Yes, please!

Free download

Thank you for reading Create your own Click-To-Tweet and follow links. I have closed the comments for now, but I welcome you to write your response to your own blog, or to voice them at Twitter or Facebook. In case you wrote your response on your blog, do let me know so that I can read it and possibly link to it from this post.

I will gloriously ignore (and, where possible, report) any responses which contain personal attacks, or seek to promote unrelated business or scams.

Create your own Click-To-Tweet and follow links Tweet this

Did you like this post? Help me buy food:
Become a Patron!

31
Mervi's picture

Hei, I'm Mervi!

An artist, geek girl, marketer, and business coach, devoted to help you to be undeniable.

Read more