TwitterAPI.TwitterOAuth¶
- class TwitterAPI.TwitterOAuth.TwitterOAuth(consumer_key, consumer_secret, access_token_key, access_token_secret)¶
Optional class for retrieving Twitter credentials stored in a text file.
Parameters: - consumer_key – Twitter application consumer key
- consumer_secret – Twitter application consumer secret
- access_token_key – Twitter application access token key
- access_token_secret – Twitter application access token secret
- classmethod read_file(file_name=None)¶
Read OAuth credentials from a text file. File format:
consumer_key=YOUR_CONSUMER_KEY
consumer_secret=YOUR_CONSUMER_SECRET
access_token_key=YOUR_ACCESS_TOKEN
access_token_secret=YOUR_ACCESS_TOKEN_SECRET
Parameters: file_name – File containing credentials or None (default) reads credentials from TwitterAPI/credentials.txt