Android 调用Tumblr post reblog api时获取401(未授权)

Android 调用Tumblr post reblog api时获取401(未授权),android,api,authentication,tumblr,Android,Api,Authentication,Tumblr,调用Tumblr post reblog api时,我得到了401状态,其他Tumblr api工作正常 我跟随了一些Stackoverflow链接,但没能骑上它 我的代码片段: String url = String.format(REBLOG_URL, blogName); HttpPost request = new HttpPost(url); List<NameValuePair> nameValuePairs = new ArrayList<NameValu

调用Tumblr post reblog api时,我得到了401状态,其他Tumblr api工作正常

我跟随了一些Stackoverflow链接,但没能骑上它

我的代码片段:

String url = String.format(REBLOG_URL, blogName);

HttpPost request = new HttpPost(url);

List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("id", postId));
nameValuePairs.add(new BasicNameValuePair("reblog_key", reblogKey));
nameValuePairs.add(new BasicNameValuePair("comment", comment));
nameValuePairs.add(new BasicNameValuePair("api_key", consumerKey));

request.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8"));

CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(consumerKey, secretKey);
                                consumer.setTokenWithSecret(mDataStore.getAccessToken(mUserSequenceId),
                    mDataStore.getTokenSecret(mUserSequenceId));
consumer.sign(request);

String response = makePostRequest(request);

L.d(TAG, "postReblog Response : " + response);
提前谢谢

10-21 21:48:31.851: W/DefaultRequestDirector(30729):
Authentication error: Unable to respond to any of these challenges: {}
10-21 21:48:31.851: D/PhotoAPI(30729): post response code:401 10-21
21:48:31.861: D/PhotoAPI(30729): Post response :
{"meta":{"status":401,"msg":"Not Authorized"},"response":[]}