Is your MP on Twitter?

05 November 2009 Is your MP on Twitter?

One of my former "Reevoo":http://reevoo.com colleagues, Ben Griffiths, posted "an article on his blog":http://www.techbelly.com/2009/11/04/list-of-uk-mps-on-twitter/ the other day announcing that he had compiled a list of UK MPs and their Twitter usernames (if available). Whilst websites like "tweetminster":http://tweetminster.co.uk/ publish this information, Ben's list is open and "available to all on Google Docs":http://spreadsheets.google.com/ccc?key=0AjWA_TWMI4t_dFI5MWRWZkRWbFJ6MVhHQzVmVndrZnc&hl=en_GB. I thought it would be fun to hack together a little application that makes use of this data, something quick and simple. The result is "mpsontwitter":http://mpsontwitter.co.uk/ which simply requests your postcode and finds the name of your MP (using the API for "TheyWorkForYou.com":http://www.theyworkforyou.com/) and compares them against the list. Before I had finished hacking it together, I realised that tweetminster already does something similar but as I had already purchased the domain and was keen to kick the tyres of "Heroku":http://heroku.com/, I deployed it anyway. I do think there is some value in having a small focussed app like this running on a fairly catch domain. Either way, it only took a couple of hours. Incidentally, my Heroku experience was pretty seamless and I'll be sure to use it for small little apps like this in the future. I've also configured Heroku to run a cron job each night that pulls the latest data from Google docs so if Ben is able to keep the list maintained, the service should remain relatively up-to-date. There isn't much to the code - it's a basic Sinatra app with a thin (and untested) wrapper around the API - it's far from elegant but it does the job. The code is "available on Github":http://github.com/lukeredpath/mpsontwitter.co.uk if anybody is interested.