Not sure if I chose the right category for this question but I’m looking at this:
https://dev.twitter.com/docs/tweet-button
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;
}
</style>
<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>
</div>
What’s generating the text here in the anchor?
I read this at https://dev.twitter.com/docs/intents :
text
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.