My web app requires users to cast votes via twitter and display those votes in a line chart. Id like to accomplish this whole thing using JavaScript.
My Requirements:
- Using the twitter API, I need to Collect votes in real time and have those votes displayed in a line chart, in real time!
If you’re doing real time stuff, you want to use the Streaming API. It’s pretty easy to get up and running quickly using existing open-source client implementations like Phirehose. It comes with some great examples too.
Here‘s their example that tracks a bunch of keywords: you’d probably want to track whatever hashtag people are voting on:
If you’re low volume, you could probably just shove the tweet right into the database in enqueueStatus.