Twitter and Basecamp

Wednesday, May 21st, 2008

While leaving Chicago from the BEA Participate conference last Thursday, I got an idea to aggregate tweets into a Basecamp message.

During the cab ride, @danmartell mentioned that there’s value in having a section during our team meetings for reviewing relevant links.  Our team uses Twitter quite often, and it made sense to send links via replies to our company Twitter account, and then we can review all the tweets during the meeting and pick out the links.  And that’s how I decided that it’d be a lot easier to get replies each week using the since option:

eg: http://twitter.com/statuses/replies.xml?since=Tue%2C+27+Mar+2007+22%3A55%3A48+GMT

Take any replies there which have a link in the tweet, and then wrap up the tweets in XML to send to Basecamp.

Pretty straight forward, and I got it working with PHP in about an hour.  The hardest part was actually formatting the request XML for the Basecamp message.

Since I wanted one link tweet per line, I needed to insert a linebreak in the XML.  Being new to PHP, I wasn’t sure if it was “\n” or “\r\n”.  In the end, I found the PHP_EOL variable, which I was able to append to the end of each line.

If anyone wants the code I can publish it, it’s really a hackjob more than anything.

Share

2 Responses to “Twitter and Basecamp”

That’s pretty cool, take a look at a little mashup script I wrote and am working on with a friend – would love to hear your suggestions or even a review on it.

Comment by Television Spy — May 22, 2008 @ 8:37 pm

forgot to mention the relevancy to this post – it’s twittering the data it logs.

Comment by Television Spy — May 22, 2008 @ 8:38 pm

leave a reply?