Crowdsourced tweet classifier that auto-replies to tweets from people mentioning terms like “bus”, “commute”, “subway”, etc. with a link to a personalized mini-questionnaire which asks them to classify their tweet based on our classification system.
Written in PHP for Heroku.
Steps to complete:
-
Set up Twitter accountproject account: @UTRC_Project -
Register App
-
Authentice as @UTRC_Project via https://github.com/abraham/twitteroauth
-
Use search API to look for Tweets with our search terms within the last n minutes via https://dev.twitter.com/rest/public/search (we need to somehow trigger this automatically every n minute)
-
Parse the response, and for every tweet:
-
Reply to the tweet via https://dev.twitter.com/rest/reference/post/statuses/update. The response needs to contain a custom URL a la http://ourapp.com/classify.php?tweetid=1234
-
If the user clicks on the link, show a page with the original tweet (via https://dev.twitter.com/rest/reference/get/statuses/show/%3Aid), a dropdown menu with our different classes, and a submit button. The bottom of the page should have a short text about who we are and why we do this. This page needs to be responsive to make sure it looks good on any device (use bootstrap?)
-
When the user submits the classification, the form sends back the tweet ID and the classification to the server.
-
The server uses the ID to fetch the tweet once again, and stores the columns we are interested in to PostGres: ID, username, text, timestamp, lat/lon (if available) – anything missing?
That should be all, no?