我正在尝试编写一个机器人,它将使用tweepy为我发推文。我的代码是:
CONSUMER_KEY = 'xxxxxxxxxxxxxxxxx'
CONSUMER_SECRET = 'xxxxxxxxxxxxxxxxxxxxx'
ACCESS_KEY = 'xxxxxxxxxxxxxxxxxxxxx'
ACCESS_SECRET = 'xxxxxxxxxxxxxxxxx'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
api.update_status(status='hello world')
它继续引发以下错误:
File "contest.py", line 19, in <module>
api.update_status(status='hello world')
File
"/usr/lib/python3.4/site-packages/tweepy-3.4.0-py3.4.egg/tweepy/api.py",
line 194, in update_status
File
"/usr/lib/python3.4/site-packages/tweepy-3.4.0-py3.4.egg/tweepy/binder.py",
line 243, in _call
File
"/usr/lib/python3.4/site-packages/tweepy-3.4.0-py3.4.egg/tweepy/binder.py",
line 227, in execute
tweepy.error.TweepError: Twitter error response: status code = 400
我可以以某种方式回去使用以前的版本吗?我该怎么做?