java - getting "oauth_signature does not match expected value" error while authenticating tumblr -
i got request token (oauth_token , oauth_token_secret) using https://www.tumblr.com/oauth/request_token url. constructed authorize url using oauth_token got in previous step. when try access token using app consumerkey, consumersecret, , oauth_token , oauth_token_secret, getting "oauth_signature not match expected value" error message.
message constructed hmacsha1,
string signaturebasestring = "get&" + urlencoder.encode(accessurl, "utf-8") + "&" + "oauth_callback%3d" + urlencoder.encode(urlencoder.encode(redirecturl, "utf-8"), "utf-8") + "%26oauth_consumer_key%3d" + urlencoder.encode(consumerkey, "utf-8") + "%26oauth_nonce%3d" + urlencoder.encode(string.valueof(millis), "utf-8") + "%26oauth_signature_method%3d" + urlencoder.encode("hmac-sha1", "utf-8") + "%26oauth_token%3d" + urlencoder.encode(oauthtoken, "utf-8") + "%26oauth_timestamp%3d" + urlencoder.encode(string.valueof(time), "utf-8") + "%26oauth_token_secret%3d" + urlencoder.encode(oauthtokensecret, "utf-8") + "%26oauth_version%3d" + urlencoder.encode("1.0", "utf-8") + "%oauth_verifier%3d" + verifier;
header constructed access token using request token,
string accessheader = "oauth " + "oauth_callback=\"" + urlencoder.encode(redirecturl, "utf-8") + "\"" + ", oauth_consumer_key=\"" + urlencoder.encode(consumerkey, "utf-8") + "\"" + ", oauth_nonce=\"" + urlencoder.encode(string.valueof(millis), "utf-8") + "\"" + ", oauth_signature=\"" + urlencoder.encode(signature, "utf-8") + "\"" + ", oauth_signature_method=\"" + urlencoder.encode("hmac-sha1", "utf-8") + "\"" + ",oauth_token=\"" + urlencoder.encode(oauthtoken, "utf-8") + "\"" + ", oauth_timestamp=\"" + urlencoder.encode(string.valueof(time), "utf-8") + ",oauth_token_secret=\"" + urlencoder.encode(oauthtokensecret, "utf-8") + "\"" + ", oauth_version=\"" + urlencoder.encode("1.0", "utf-8") + "\"" + ", oauth_verifier=\"" + verifier + "\"";
can please me solve this?
Comments
Post a Comment