@scruffbot

A few weeks ago I decided on a whim I wanted to learn how the Twitter API works, so I went and registered @scruffbot and created a corresponding application. Then, because I am lazy and impatient (like any virtuous programmer) I went looking for a library to use. I ended up with this Twitter with OAuth PHP class by Tijs Verkoyen, which does all of the heavy lifting for me. Thanks, Tijs.

@scruffbot hands out starsSo what does @scruffbot do? Well, like me, he’s obsessed with tea. Every couple of hours he searches the public timeline for people saying cup of tea. Then he filters out any mentions of “not my cup of tea” or “isn’t my cup of tea” so he’s left with only positive tea-making and tea-drinking activities.

Of these remaining tweets, he stars a bunch at random, then retweets one of them. And that’s it, for now. I’m planning on making him tweet just before he starts this process — a phrase picked at random from a dictionary of insane robotic tea rambles.

What I’ve found really interesting about this little project is how many people start following @scruffbot, even though this is all he does. I deliberately chose not to make him mention the people he picks, because I think that’s kind of obnoxious. Other than starring and retweeting, he has no interaction with the tea-drinkers, but every day he gains a new follower or two. It’s kind of sweet.

And, of course, people who drink tea are universally good people.

  3 comments for “@scruffbot

  1. April 27, 2012 at 2:16 pm

    How damn cute can one hot, sexy, charming, intelligent, British handsomebrarian be? *hugs* I’m only sad that @scruffbot can’t find me because of idiots.

  2. thejudge13
    September 20, 2012 at 2:07 pm

    Unbelievable. I was drinking a cup of lapsang souchong when scruffbot contacted me. Could do with understanding twitter API myself.

Leave a Reply

Your email address will not be published. Required fields are marked *