All-in-one Twitter extender and URL shortener
If you use Twitter much, you’ve inevitably come up against the service’s 140-character limit, and have tried various workarounds to get your thoughts across within that constraint. You can judiciously edit your text, send followers to a blog, or break your content into multiple tweets. None of these solutions is ideal.
What’s really needed is a way to just type as much as you want into the text-entry field of your Twitter home page or a desktop client like Tweet Deck, click Update, and have your message appear on a web page, with a shortened URL helpfully embedded in your tweet. Unfortunately, there isn’t an easy way to do that—yet.
What I present below is a proof-of-concept, which should allow a programmer to build this functionality into a tool like Tweet Deck or a browser extension like Power Twitter. I’m not a programmer, so I can’t build it, but I’m hoping someone will take this idea and run with it—or poke holes in it if there’s a better way to make it happen. (A programmer may also be able to find a way to make this work in Internet Explorer; right now, it works in Firefox, Chrome, Safari and Opera, but not IE) Here’s how my concept works:
The key to this is the data URI, a decade-old standard that’s rarely been used for anything practical (other than as a kludge for storing files on iPhones). The data URI standard allows you to store any kind of data in a link, and have it load as a web page in a browser. (By now, you should see where I’m going with this.) By storing all of the data in a URI, you don’t need to build a physical web page to host your content. And, yes, by using a URL shortening service, you can send that data to Twitter in well under 140 characters.
Here’s how it works in action, using existing tools:
1. Take your content and turn it into a data URI at the Data URI Kitchen. This can be any content, including rich media. Of course, the larger the file, the longer the data URI, and browsers can choke on those that are too long. So, keep it simple. In the example here, I’ve pasted in the full text—and only the text—of a recent post I wrote for The Consumerist. Total character count: 2,110.
If you click on this link, you’ll be taken to a “page” that contains all of that text—which is embedded in the link itself. Of course, that link is a whopping 2,395 characters in ASCII, and 3,022 in Base 64. No good for Twitter. But that’s where Step 2 comes in.
2. Go to your URL shortener of choice and paste in that mammoth URI. Follow the instructions to shorten it. In this example, I went to TinyURL, and turned those 3,022 characters into this: http://tinyurl.com/nqghtj. Go ahead, click it. It works. And, yes, you can tweet it.
So, that’s my proof of concept. If you’re a programmer, you’re invited to turn this into an easy-to-use function that will work seamlessly with existing Twitter apps (or a new one). One request if you’re doing so: Please don’t charge for it. Twitter is free, most of the many great Twitter apps are free, and the tools that allowed me to come up with and test this idea are free. So, please, do it for free, or—even better—open-source it. Thanks!


June 10th, 2009 09:28
I have seen a few tweets that stop mid-sentence with … at the end. The … is a link and if you hover over it the pop up says something like “oops, the message went over 140 characters, click here to see the rest of the message” or something like that.
If you click it it goes to a twitter page with just that message in full in the middle. and the std. header, background and tool buttons top right to go back to your profile, main, etc… but not the side menu on the right.
Would be nice to see this BUT, too many people are verbose and can say the same in less words! Sorry to say I am guilty of this. But there are times when 140 just won’t do. Mutliple tweets are the only remedy OR I have put up a page what I want to say then start it in tweet with url to the rest of it on my own site.
June 10th, 2009 12:08
This is a very clever application of data URIs, Marc.
Also, I didn’t know you were writing for The Consumerist—that’s awesome, congrats!
June 11th, 2009 10:24
TinyURL is suffering growing pains … many shortened URLs don’t translate because TinyURL’s servers are apparently overwhelmed with traffic. Try tr.im … digg.com … bit.ly etc. instead of TinyURL.