This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
twitter_media_tool/lib/authentication.py

12 lines
320 B
Python
Raw Normal View History

2020-04-24 14:38:39 -05:00
#!/usr/bin/python3
from tweepy import OAuthHandler, API
2020-04-24 14:38:39 -05:00
def authenticate_twitter(config):
auth = OAuthHandler(config['api_key'], config['api_key_secret'])
auth.set_access_token(config['access_token'],
config['access_token_secret'])
twitter_api = API(auth)
return twitter_api