Writing the text in a share box


Not sure if I chose the right category for this question but I’m looking at this:


and I want to use a button like this in an html email and I imagine I could create a button with inline css but my main concern is figuring out how to write my own message when someone clicks on the button.

This is the example I planned on using:

<style type="text/css" media="screen">
  #custom-tweet-button a {
    display: block;
    padding: 2px 5px 2px 20px;
    background: url('http://a4.twimg.com/images/favicon.ico') 1px center no-repeat;
    border: 1px solid #ccc;
<div id="custom-tweet-button">
  <a href="https://twitter.com/share?url=https%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button" target="_blank">Tweet</a>

What’s generating the text here in the anchor?

I read this at https://dev.twitter.com/docs/intents :

Pre-prepared, properly UTF-8 & percent-encoded Tweet body text. Users will still be able to edit the pre-prepared text. This field has a potential of 140 characters maximum, but consider the implications of other parameters like url and via.

Usage Examples
Trivial: @twitterapi

Complex: Farsi%20%D9%BE%D8%A7%D8%B1%D8%B3%DB%8C ( “Farsi پارسی” ) Try it

Is this saying the only way to customize it is to manually write it with percent encoding? That’s extremely tedious if the task of writing the content in the share box is given to someone who is unfamiliar with this.


You won’t be able to use the Tweet Button in an HTML email as HTML emails do not allow for Javascripts or IFRAMEs typically, all crucial technologies for making this work.

You’ll want to look at [node:183, hash=“tweet”] instead, which are just simple A HREF links you build pointing to Twitter. You’ll still need to know how to HTML entity encode your pre-prepared status to pass it to the URL – it’s just how the web works.


I received an email yesterday that had some text and it linked to the share box with an editable tweet inside.

When I viewed the source this is what I saw:

Click here to Tweet it out

It pushed to this https://twitter.com/intent/tweet?text=Awesome+event!+Social+Fresh+launches+first+Facebook+Ad+conference.+All+online.+http%3A%2F%2Fadvancedfacebookads.com&source=clicktotweet

Looking at where that url I can write my own like this then?



closed #5