Frage

I am using python-twitter api and i got consumer_key, consumer_secret, access_token_key, access_token_secret but when i try code below i got this output {} for print api.VerifyCredentials() and i got none for print status.text

import twitter

api = twitter.Api(consumer_key='**',
                      consumer_secret='**',
                      access_token_key='**',
                      access_token_secret='**')

print api.VerifyCredentials() #returns {}
status = api.PostUpdate('Ilovepython-twitter!')
print status.text #returns none

What do you think is problem here?

War es hilfreich?

Lösung

Here the problem was library 'twitter' for sure. Don't import 'twitter' use 'tweepy' instead and it will work.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top