Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

2. Collecting Tweets

Falcon Wong edited this page Jan 20, 2016 · 1 revision

#Twitter Data Collection

  1. # for a Twitter account
  2. Create an application
  3. Go to Twitter-Healthcare-Analysis\src\Twitter-Data-Collection\resources and save your credential keys in crendentials.json
[
	{
		"consumer_key" : "your_key",
		"consumer_secret" : "your_secret",
		"access_token" : "your_token",
		"access_token_secret" : "your_token_secret"		
	}
]
  1. Select tags to download and enter them one per line in tagList.txt like so... Make sure the list isn't too long!
#cancer
#ebola
...

Streaming new tweets

  1. Run stream_tweets_main.py
$ stream_tweets_main.py [destinationFolder] [credentialFolder]

Downloading old tweets

  1. Run search_tweets_main.py
$ search_tweets_main.py [destinationFolder] [credentialFolder]
Clone this wiki locally