How To Use
- Get Twitter OAUTH tokens from the Twitter developer site
- Create a
twitter.ymlfile and add your credentials like in the
- Make sure you have all the required ruby gems installed by running
ruby twitter.rb search_term
It is only set up to run for a singular search term, and will print out the daily count for that term
bash twitter.sh <search-term> <search-term> ...with as many terms as you want
I built this basic set of files to be able to quickly generate a graphic comparing the number of tweets that included specific terms or companies' handles. I then made it a simple bash script using a ruby script to get tweets from Twitter and an R Script to visualize.
- Twitter only gives you API access to the last 7 days of tweets. The next step is to make this run daily with a given set of terms.
- The API or my script is not perfect and often fails to find results. If it is my script and someone fixes it, I would love to know!