这是我获取关注者和更新状态的代码:
from twython import Twython,TwythonError
APP_KEY='mykey'
APP_SECRET='mysecret'
OAUTH_TOKEN='mytoken'
OAUTH_TOKEN_SECRET='mytokensecret'
twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
followers = twitter.get_followers_ids(screen_name = "darcythegreat")
for follower_id in followers:
print follower_id
try:
twitter.update_status(status='My first status using Twython')
except TwythonError as e:
print e
这是我推特的链接。
运行它后,我收到以下错误:
python tweet.py
previous_cursor
previous_cursor_str
next_cursor
ids
next_cursor_str
Twitter API returned a 401 (Unauthorized), An error occurred processing your request.
你能告诉我我缺少哪些步骤吗?