Bazinga
Bazinga

Reputation: 2466

Auto Post/Tweet Twitter API

I tried auto-post feature of Tweepy API.

Here is the code:

auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)

api = tweepy.API(auth)
if api.verify_credentials():
    api.update_status('HELLO');

I tried logging auth it returns a value, tried returning api returns a value. Thus meaning it has the right values, but then it always fail in the api.verify_credentials()

It also have an error showing this: [{Could not authenticate you', u'code': 32}]

Is there other settings I need to add, or what can be done for the tweet to work. I searched other answers its almost the same as mine. But what could be missing.

Thanks for the reply.

Upvotes: 0

Views: 1241

Answers (1)

raul
raul

Reputation: 1269

The authentication key might change every time you click on the link (that was provided to generate the key). Make sure you are using the latest key that was generated.

Upvotes: 0

Related Questions