I am trying to create oauth signature. But I dont know what I am doing wrong because the site giving unauthorize error. I am using oauth version 1.0. Method is HMAC-SHA1 and it is google based oauth. My base string is correct because it checked it with sample output. My code :
string oauthSig = "";
string baseString = HttpUtility.UrlEncode(httpMethod.ToUpper()) + "&" +
HttpUtility.UrlEncode(url) + "&" +
HttpUtility.UrlEncode("oauth_callback="+callback+"&"+
"oauth_consumer_key="+consumerKey+"&"+
"oauth_nonce="+nounce+"&"+
"oauth_signature_method="+sigMethod+"&"+
"oauth_timestamp=" + timestamp + "&" +
"oauth_version=" + version
);
HMACSHA1 myhmacsha1 = new HMACSHA1(Encoding.UTF8.GetBytes(HttpUtility.UrlEncode(consumeSecret)),true);
byte[] hashValue = myhmacsha1.ComputeHash(Encoding.UTF8.GetBytes(baseString));
oauthSig = Convert.ToBase64String(hashValue);
Please tell me if I am doing anything wrong.
Thanks