在python2.7和已安裝從twitter-python Building sectionTwitter的蟒蛇 - 得到一個錯誤的文檔
的requirements.txt這是我第一次跳躍,並按照基本步驟,以確保一切以下好吧,如此處鏈接twitter-python Documentation section中所述,我收到錯誤消息。
這裏typen的在命令行Python的外殼:
>>> api = twitter.Api(consumer_key='consumer_key',
consumer_secret='consumer_secret',
access_token_key='access_token',
access_token_secret='access_token_secret')
錯誤:
>>> print api.VerifyCredentials()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.virtualenvs/twitter/local/lib/python2.7/site- packages/python_twitter-1.2-py2.7.egg/twitter.py", line 5209, in VerifyCredentials
data = self._ParseAndCheckTwitter(json.content)
File "/home/ubuntu/.virtualenvs/twitter/local/lib/python2.7/site-packages/python_twitter-1.2-py2.7.egg/twitter.py", line 5462, in _ParseAndCheckTwitter
self._CheckForTwitterError(data)
File "/home/ubuntu/.virtualenvs/twitter/local/lib/python2.7/site-packages/python_twitter-1.2-py2.7.egg/twitter.py", line 5487, in _CheckForTwitterError
raise TwitterError(data['errors'])
twitter.TwitterError: [{u'message': u'Invalid or expired token', u'code': 89}]
什麼可能我在這裏失去了?
哦,我明白了!我多麼失明!?我認爲這會像編程術語中通常那樣神奇地工作。謝謝馬特! –