1

我正在尝试从 twitter 获取请求令牌,但我遇到了一些问题。我使用 twitter4J 来查看它是否可以使用它并且确实可以,但是当我使用 twitter oauth 工具获取有效的授权标头,并将其复制并粘贴为http://api.twitter.com/的授权标头时oauth/request_token在 twitter 开发者控制台中我收到 401 错误(“无法验证签名和令牌”)。我已经为其他需要身份验证的请求尝试了相同的复制和粘贴方法,它可以工作,但它不适用于这个请求。关于发生了什么的任何建议?

4

1 回答 1

0

Ok I figured it out! The problem was that the oauth access token is included in the header when you use the twitter oauth tool, with the access token being that of the twitter account related to your application. But if you are using the request_token url you shouldn't already have that, and that is why it throws the error. Thus the twitter oauth tool is useless for a request to this url.

于 2012-09-03T16:27:44.803 回答