Using Twitter as a voting platform

Cast of Star Trek

Like a lot of other people, I've had a love/hate relationship with Twitter. At first I didn't see the point - it was just Facebook without the features, then I drank the kool-aid, and fell in love with its simplicity and openness. Nowadays I've backed off a bit and see it as an interesting social phenomenon that I enjoy being a part of. I'd been meaning to check out the Zend_Service_Twitter PHP library for a while, but hadn't really thought of an excuse.

A few weeks back I was unlucky enough to watch Star Trek V and tweeted about how crap it was, despite my friend Nick thinking it's the best of the lot. There was a bit of back and forth, so I posted an order for the films, from best to worst. A few of my friends then did the same, with the hashtag of #startrekrank as a way of identifying the posts.

It struck me that I could somehow aggregate these results using the Twitter API, so I present to you, StarTrekRank.com!

Actually building the site was pretty straightforward. The Twitter API combined with the Zend library make it pretty simple to perform searches. I'm generating the rankings using the Kemeny-Young method, which is fairly processor-intensive - I suspect it's O(n!) for the number of movies - but to my mind produces very fair results.

The way the site operates is to periodically search for #startrekrank via the API, and index any new tweets. Then if there are some new tweets, the overall ranking is re-calculated automatically. Finally, the new tweeters get a message sent @them from the 'startrekrank' twitter account thanking them and directing them back to the main site to view the results.

As a voting platform, Twitter is pretty efficient - voters are authenticated via their Twitter account so you know who the votes have come from. It's only real downside is that a secret ballot isn't very practical. Now clearly this is all just a bit of fluff, but to me it's an interesting illustration of how Twitter's openness and simplicity allow more complex applications to be built on top of it.

Bookmark and Share

Comments

1.

10/10 on the geek scale. ;)

Russell
15th June 2009, 11:09

2.

fyi, I put together some tools to let you vote via Twitter (with or without the PowerPoint presentations), here: http://www.sapweb20.com/blog/powerpoint-twitter-tools/

Timo Elliott
14th December 2009, 20:07

Add a comment