David Hutchison

Ruby / Twitter woes

A while ago I made a modified version of the Twitter Favourites to The Hit List script to import in to the Reminders application that ships with Mountain Lion. I have completely moved away from The Hit List due to the lack of updates / support the application is getting. Currently I am using a combination of Due and Reminders for my workflow.

I had recently started using RVM so I could upgrade ruby easily for another project I was working on, but this has caused some issues. The latest version of the Twitter Ruby Gem, as a result of twitter API changes, has removed the ability to call methods unauthenticated. This is a major headache and has implications on how easy the script is to distribute in a working fashion.

In order to call methods on the Twitter API it is now required to have a consumer (developer) API key, that must remain secret, as well as an OAUTH token for the user that is using the application. This poses two issues:

  • at this point, I have no idea how to easily do an OATH authentication from a command line ruby script
  • the bigger issue is how to keep a consumer key secret is an open source script. It seems a bit of a hassle requiring any user that wants to use it to get their own twitter developer API key

I am hoping to get back to looking at this in the next week or so, with the hope of releasing an updated version soon. Unfortunately at this time I may look like each user may need to get their own API key, unless I can find a way around this obstacle.