문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top