Python: AttributeError: module 'tweepy' has no attribute 'OAuthHandler'

0

I am a beginner in programming, and recently I have problems with OAuthHandler authentication, how can I solve it

    
asked by DarkStormSeeker 31.10.2017 в 01:51
source

1 answer

0

The written code is like this: (it was the second attempt with consumer_key)

import tweepy

consumer_key =""
consumer_secret= ""
access_token=""
access_token_secret=""


from tweepy.auth import OAuthHandler
auth= tweepy.OAuthHandler(_consumer_token, _consumer_secret)
auth.set_access_token(_access_token, _access_token_secret)
api= tweepy.API(auth)
print (api.verify_credentials())

public_tweets = api.home_timeline()
for tweet in public_tweets:
    print (tweet.text)
    
answered by 31.10.2017 в 03:06