Dr. Twoot and the new retweeting

This morning a weird tweet showed up in Dr. Twoot.1 It was from Clint Ecker (@clint) from Ars Technica. It’s not that the topic of the tweet was weird; nor, as far as I know, is Clint Ecker. What was weird was that I don’t follow Clint Ecker, and yet there was his tweet, appearing in my stream as if I were.

A short while later, John Gruber (@gruber) mentioned that he was a beta user of Twitter’s new-style retweets, currently being tested by some of the Twitterati. The Ecker tweet was a Gruber retweet. This not only explained the weird tweet, it suggested that the new retweeting system is getting close.

If you go to the Twitter API page, you’ll see several methods marked [COMING SOON] that are all related to the new-style retweets. When the new system comes out of beta, retweeting will be a formally supported Twitter feature with its own set of data; it won’t be an ad hoc format with everyone choosing his or her own style.

In anticipation of the new retweeting, I’ve made some changes to Dr. Twoot, all of which are available at its GitHub repository. Some of the changes are usable today, some won’t be usable until the new system goes live.

First, I changed from the soon-to-be-deprecated friends_timeline method to the new home_timeline method. I think these two methods return identical results right now, but that won’t be true in the future. (The API docs on home_timeline say that friends_timeline won’t have the new retweets, but that certainly isn’t the case now. This morning Dr. Twoot was still using friends_timeline, but it picked up the new-style retweet from Gruber.) Although home_timeline is marked [COMING SOON] in the API docs, it’s working now.

Second, I changed the way new-style retweets are displayed, adding the name of the retweeter to the end. This may break if more than one of the people I follow retweets the same message, but it’s working so far.

Since I decided to prefix the retweeter’s name with “via,” I changed the Twitter client prefix from “via” to “from.”

Finally, I added lines to Dr. Twoot’s retweet function that will (I hope) follow the new API. Since this feature isn’t available to everyone yet, I have these lines commented out and haven’t been able to test them. When Twitter flips the switch on retweeting, I’ll comment out the current retweeting code, uncomment the new lines, and make sure things work the way they should.

Tags:


  1. You know Dr. Twoot, right? The JavaScript-based Twitter client that’s sweeping the nation? The one I’ve blogged about many, many times because I wrote it? (OK, rewrote it.) Yeah, that Dr. Twoot.