def authenticate():
#generate auth details and assign appropriately
_get_secrets()
consumer_key = secret_keys[0]
consumer_secret = secret_keys[1]
access_token = secret_keys[2]
access_token_secret = secret_keys[3]
#access our twitter app with the appropriate credentials
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
#create tweepy object
global api
api = tweepy.API(auth)
#a test function to see if all the authenticateion is working
评论列表
文章目录