3

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?

Burk
  • 2,969
  • 1
  • 23
  • 24
  • 1
    i used tweepy instead. problem is about python-twitter api i think. – Burk Sep 11 '13 at 12:57
  • 1
    I had the exact same issue and switched to Tweepy as well, seemed just as easy and was able to do the same basic functions. – Stedy Oct 15 '13 at 00:52
  • 1
    switching to tweepy works, I suggest Burk should put it as an answer instead of a comment. – Walty Yeung Jun 26 '14 at 03:20

1 Answers1

0

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

Burk
  • 2,969
  • 1
  • 23
  • 24