tweetgen-template.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:coding-with-bots 作者: mtdukes 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号