Skip to content

CARSILab/TweetClassifier

Repository files navigation

Tweet classifier

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:

  1. Set up Twitter account project account: @UTRC_Project

  2. Register App

  3. Authentice as @UTRC_Project via https://github.com/abraham/twitteroauth

  4. 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)

  5. Parse the response, and for every tweet:

  6. 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

  7. 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?)

  8. When the user submits the classification, the form sends back the tweet ID and the classification to the server.

  9. 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?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published