使用Twitters API

2024-03-29 07:21:36 发布

您现在位置:Python中文网/ 问答频道 /正文

当我尝试访问他们的API时,我遇到了一个验证错误。我不是在应用程序中使用它,只是编写一些脚本来进行操作

r = requests.get('https://api.twitter.com/1.1/users/show.json?screen_name=dhh')
print r.text

退货

{"errors":[{"message":"Bad Authentication data","code":215}]}

有人能解释一下我怎么能解决这个问题吗


Tags: namehttps脚本comapijson应用程序get