Twitter no longer allows basic authentication so this no longer works.

Want your readers/members to have the ability to retweet some of your content? It's a great way to spread the word and has worked wonders for ThumbVu.

I've made it as EASY as possible for you to do this.

All you have to do is put the below code where you want the Tweet This box to show, and that's it! Of course, you'll probably want to change the content of the tweet, so just change what's in between the quotes after var tweet_content, so var tweet_content = "Your content";. A couple rules for that, DO NOT start a new line, and if you put in quotes " put a backslash \ before them. Also note that Twitter has a character limit of 140.

[javascript]
<script type='text/javascript'>
var tweet_content = "Want an easy way to add a \"Tweet This\" box to your site? http://austinhallock.com/short/16";
</script>
<div id='tweet_this' style='display:none;'></div>
<script type='text/javascript' src='http://www.austinhallock.com/tweet_this.js'></script>
[/javascript]

You can see an example of this below. (If you're in an RSS reader, this probably won't show, so click here to see it.

 

Pretty cool huh?

If you want a bit of customization, you can add the following after var tweet_content = 'whatever';. The first will change the background color of the box, the second will change the font color.

[javascript]
var tweet_bgcolor = '111111';
var tweet_color = 'EEEEEE';
[/javascript]

You can also allow the users to change what's in their tweet by adding:

[javascript]
var tweet_textarea = 'T';
[/javascript]

As always, let me know what you think!