簡體   English   中英

在identi.ca中將tweepy庫與Python一起使用

[英]Using tweepy library with Python in identi.ca

我正在使用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

PD:當然,用戶名和密碼是正確的憑據:)

tweepy文檔所暗示的那樣,僅使用identi.ca作為主機並將api_root設置為/api將是訪問identi.ca API的正確方法。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM