What is a click to tweet URL?

Twitter allows for content to be passed through a URL, allowing users to tweet something with one click. It’s most popular on the twitter share buttons located on virtually every article on the internet. You can use these URL’s to prompt users to tweet anything, but they’re a little annoying to setup.

    <a href="https://twitter.com/intent/tweet?text=Your%20tweet%20will%20probably%20look%20like%20this.&source=tristantimblin&related=tristantimblin" target=_blank">Tweet!</a>

A Tweet URL has three data types, involved in creating what they call an ‘intent’.

  • Text - The tweet
  • URL - To include in the tweet
  • Source/Related - After the user tweet’s the tweet, they will be prompted to follow this user if not already.


If you’re planning on having this functionality scale, you may need to implement something to generate them dynamically. I wrote about how to build share links for Twitter, Facebook, and Linkedin live here. If you don’t need to scale though, building a few using a generator is a breeze. The main one I found was clicktotweet.com, but after using it I noticed some missing features I needed. Most notably being more control of including a URL, and access to the source.

My own URL builder

Vue.js seemed like the perfect tool for building a small, easy to use url builder. I could enter in my tweet and set the other data types, to build my URL in real time. To use it yourself, replace my @handle with yours, type your tweet in the main box, then select the appropriate URL option. Test it by clicking ‘tweet’, and then get your URL by clicking ‘copy’.

Try out Tristan’s Click To Tweet Builder

Let me know what you think of it, tweet at me (@TristanTimblin). Take a look at the source code aswell on Codepen.