我正在使用tweepy库在Python中为我的桌面创建一个小型新闻应用程序。正如我在主网页上看到的那样:http://github.com/joshthecoder/tweepy它支持identi.ca,但我无法正确登录。要进行身份验证,请执行以下操作:
auth = tweepy.BasicAuthHandler(username, password)
api = tweepy.API(host = 'identi.ca/api')
检查我是否正确登录:
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
这总是返回1 :(
请帮忙吗?谢谢! :d
P.D。:当然,用户名和密码是正确的凭据:)
答案 0 :(得分:1)
仅使用identi.ca
作为主机并将api_root
设置为/api
将是访问identi.ca API的正确方法,如tweepy documentation所暗示的那样。 / p>