【发布时间】:2012-06-24 08:50:42
【问题描述】:
我正在尝试使用 Java 通过 REST API 连接到 Twitter。 我正在使用 POST 将以下查询参数传递给
https://api.twitter.com/1/statuses/update.json.
include_entities=true
oauth_consumer_key=**********
oauth_consumer_secret=************
oauth_nonce=***********
oauth_signature_method=HMAC-SHA1
oauth_timestamp=1340329822
oauth_token=***************
oauth_version=1.0
status=test msg
连接到 Twitter 的实际过程是什么? 首先我需要使用授权请求获取 auth_token,然后发出 update.json 请求?
我遇到的问题是什么
{"error":"Could not authenticate you.","request":"\/1\/statuses\/update.json"}
但我检查了所有配置参数(密钥/秘密),它们是正确的。 我尝试使用 Twitter4J 连接相同的参数并且工作正常。
当我尝试使用相同的参数从 REST 客户端工具 (http://code.google.com/a/eclipselabs.org/p/restclient-tool/) 调用时,它失败了。
有什么帮助吗?
【问题讨论】: