Eric Schibli
1 min readJul 8, 2020

--

The importance of keys.key is to hold a dictionary containing your Twitter credentials. If you create that dictionary directly with a dictionary literal in your code, you don't need to access the file at all and can comment out references to the file.

IE, you can replace

with open('keys.key', 'r') as infile:

credentials = json.load(infile)

with

credentials = {'consumer_key': api_key, 'consumer_secret': secret_key, 'access_token': token, 'access_secret': secret_token}

where api_key, etc are your credentials.

If you need more support, it will be easier to help you if you raise an issue on the github repo here: https://github.com/eschibli/twitter-toolbox

--

--

Eric Schibli
Eric Schibli

Written by Eric Schibli

Eric is a data scientist at Canfor

No responses yet