Using tweepy library with Python in identi.ca
I'm using the tweepy library to make a small news application for my desktop in Python. As I've seen in the main web page: http://github.com/joshthecoder/tweepy it has support for identi.ca but I can't manage to log in correctly. To authenticate I do:
auth = tweepy.BasicAuthHandler(username, password)
api = tweepy.API(host = 'identi.ca/api')
To check if I logged in correctly:
if api.verify_credentials() is False:
print 'Unable to log in, check credentials and server status\n'
return 1
else:
print 'Correctly logged in!\n'
return 0
This always 开发者_如何学Goreturns 1 :(
Some help please? Thank you! :D
P.D.: Of course, username and password are correct credentials :)
Using just identi.ca
as the host and setting api_root
to /api
would be the correct way to access the identi.ca API, as implied by the tweepy documentation.
精彩评论