在identi.ca中使用带有Python的tweepy库

时间:2010-08-15 18:47:16

标签: python tweepy

我正在使用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。:当然,用户名和密码是正确的凭据:)

1 个答案:

答案 0 :(得分:1)

仅使用identi.ca作为主机并将api_root设置为/api将是访问identi.ca API的正确方法,如tweepy documentation所暗示的那样。 / p>