16 lines
541 B
Python
16 lines
541 B
Python
![]() |
#!/usr/bin/python3
|
||
|
|
||
|
#from tweepy import OAuthHandler, API
|
||
|
from twitter import Api
|
||
|
|
||
|
def authenticate_twitter(config):
|
||
|
# auth = OAuthHandler(config['api_key'], config['api_key_secret'])
|
||
|
# auth.set_access_token(config['access_token'], config['access_token_secret'])
|
||
|
# api = API(auth)
|
||
|
twitter_api = Api(
|
||
|
consumer_key=config['api_key'],
|
||
|
consumer_secret=config['api_key_secret'],
|
||
|
access_token_key=config['access_token'],
|
||
|
access_token_secret=config['access_token_secret']
|
||
|
)
|
||
|
return twitter_api
|