【发布时间】:2016-12-19 02:41:21
【问题描述】:
我想从 Twitter REST API 中提取数据。我已经创建了消费者密钥、秘密和访问令牌、秘密。我尝试过使用“Test OAuth”,它会生成一个 CURL 命令,但如果我更改任何一个参数,那么它会给出以下错误。 消息:{"errors":[{"code":32,"message":"Could not authenticate you."}]}
现在我想在 shell 脚本中使用 CURL 为不同的屏幕名称调用 twitter API。
我想要一个示例命令,如下所述
curl --get 'https://api.twitter.com/1.1/statuses/user_timeline.json' --data 'count=2&screen_name=aswin' APIKEY:"xxxxxx",Acesstoken:"yyyyyyyy"
提前致谢。
问候, 阿斯温
【问题讨论】:
-
假设你的 box 上安装了 ballerina(ballerinalang.org),你可以创建一个 ballerina 脚本来使用它的内置支持为你完成 twitter 工作,并在 shell 脚本中调用它或壳本身。 ballerinalang.org/docs/api/0.8/…