使用“测试OAuth”功能(应用程序设置),我可以为指定的API请求生成完全设置好的curl命令:
curl --get 'https://api.twitter.com/1.1/followers/ids.json'
--data 'count=10&cursor=-1&screen_name=microsoft'
--header 'Authorization: OAuth
oauth_consumer_key="123consumer",
oauth_nonce="123nonce",
oauth_signature="123signature%3D",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1402309080",
oauth_token="123-token",
oauth_version="1.0"'
--verbose
我想要做的也是这样,但需要使用不同的API请求。但是在以上命令中只是将"microsoft"替换为"google"将会导致一个错误:
{"errors":[{"message":"Could not authenticate you","code":32}]}
为什么不可能实现,如何使其工作?
据我所知,OAuth 授权请求所需的只是以下图表中步骤 G 中列出的 OAuth 密钥/值:
以下是“官方”答案:授权请求