How to create a tweet button with specific content

The quickest guide for creating a tweet button with ready-made content

Bahadir Balban

Started Tech Buzz


Why do this?

This will help your avid users spread the word for you if you do the work and prepare what to tweet.

Step 1: Start with the following twitter button code:

<a class="twitter-share-button" data-size="large" 
Tweet: Why SaaSBox?</a>

Step 2: Prepare the content you want tweeted:

When I needed this, I created a quick reminder for why my service matters: E.g. “Why SaaSBox? You should be able to validate your idea, build an audience, build the majority of a web-based SaaS or online business on a budget and quickly.”

Step 3: Encode text into url snippet

Go to this URLEncoder / Decoder website, paste the content, press “encode”

Step 4: Copy and paste the encoded string

Copy & Paste the generated string into right after tweet?text= in the tweet button code. The Step 1 button code has already a working example.

Step 5: Add button in your html.

Regarding the ‘twitter-share-button’ class, when you include some twitter SDK javascript, it will magically parse that class and use the right button style.

Join The Discussion