August 8, 2007
MarkBernstein.org
 
Follow me on Twitter

Tinderbox 4: Twitter

At the end of the new tutorial on Email and Twitter from Tinderbox, there's a note about a simple trick: we can make an adornment Twitter the title of any note you drop on it. Here's the OnAdd action:

result=runCommand("curl -d 'status="+$Name+"' -u tinderboxer:eastgate http://twitter.com/statuses/update.xml")

This is, at first glance, a forbidding piece of command-line stuff. Command lines are like that! (It should all be one line, of course) What it does, simply, is it sends a message

status=....name of note ...

to a special URL at Twitter. Twitter gets the message, and then relays the message to your friends. Voila.

Tinderbox 4: Twitter
Twittering from a Tinderbox document

You don't need us to do this: you could have figured it out yourself from Twitter's examples. (The new runCommand function in Tinderbox 4.0 does make this a lot easier than it used to be.) It doesn't have to be Twitter; you can use this sort of hook to connect to all sorts of Web services — including new ones we don't know about yet.