Recursive Tweets

I’m a twitter user, you can follow me here. I’m also the nerd side of ROSA LOVES, and I do most of the tweeting for it as well. We’ve recently started sending out a newsletter via email quite regularly, and have been trying to combine that in various ways with our tweeting.A few days ago I realized I could easily create link that, when clicked on, would lead the user to their twitter homepage with the status text already completed with whatever text I chose. Pretty cool and not sleazy, as it doesn’t actually tweet, it just makes it easier for a user to do it. This is accomplished by providing a GET variable “status” to the twitter home url, like so:http://twitter.com/home?status=hello. If you click on that link and are logged in to twitter, you’ll immediately see the results I described. If you’re not logged in, you will be guided to the login page and, upon successful login, taken to your profile with the status populated as described.Useful for what we’re doing I thought, but I was wanting to step it up a notch. One of the major factors of the web 2.0 culture is the ease with which information can be created, spread or otherwise affected by general users. Think of how huge digg was (is?), how second-nature social bookmarking is, and how commonplace things like the Share This widget have become. What I wanted to create was a link that, when clicked, would result in a ready-to-tweet message as above, with the addition of link that would replicate the behavior tacked onto the end.And so, I present to you this link. Click it. Go ahead. It’s a URL shortened via bit.ly that expands to a twitter message populating link. That link, in turn, contains another link by this same URL. The hope then is that a user will use it to tweet a message, and then his/her followers will see it, like it, and just click the link to propagate the tweet to their own profile. And so on, so forth.Here’s a quick and dirty howto:

  1. First create your message, making sure to observe the length constraints. Be sure to leave sufficient room for your link.
  2. Next, find an unused short name at a shortening service. For example, check bit.ly URLs for their existence simply by concatenating a short name with the base URL. Let’s pretend “hellothere” is an available short name, which would give us the shortened URL http://bit.ly/hellothere. This works with bit.ly because they let you choose a short name, as long as it’s not already used. 
  3. Once you’ve found a free shortend URL, append that to your message making sure to observe the length restrictions imposed by twitter (or whomever).
  4. URL-encode your complete message so it can be passed as a parameter directly in the twitter URL. Here’s a simple URL-encoder.
  5. Now that you’ve encoded your message, test it by concatenating it with the twitter status URL. For example, if your message is “Hello there”, it will now be “Hello there (tweet: http://bit.ly/hellothere)” (encoded as “Hello+there+(tweet%3A+http%3A%2F%2Fbit.ly%2Fhellothere)”), then the URL to test will be http://twitter.com/home?status=Hello+there+(tweet%3A+http%3A%2F%2Fbit.ly%2Fhellothere).
  6. After verifying that the link works as expected, shorten that URL with bit.ly using your selected short name (”hellothere”).

Now you can use that URL directly in your browser to generate the twitter message with the embedded, recursive “tweeting” link. When posted, followers will see “Hello there (tweet: http://bit.ly/hellothere)”, and the link will propagate that exact message to their twitter status window when clicked. All they need do is click “update.”

Leave a Reply

You must be logged in to post a comment.