I have enabled xAuth of my Tumblr app and I'm sure the signature is correct (tested with the sample values of twitter sample and got same signature -
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(URL_ACCESS_TOKEN);
request.Headers.Add("Authorization",authHeader.ToString());
//the header content is: OAuth oauth_consumer_key="****",oauth_nonce="8632175",oauth_signature="LMkN3SZA%2FbCJqiVgz0cIilv7VLo%3D",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1340678985",oauth_version="1.0"
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
StreamWriter requestWriter = new StreamWriter(request.GetRequestStream());
requestWriter.Write(xauthParams.ToString());
//the post body is: x_auth_username=jameszhou%40high****.com&x_auth_password=test&x_auth_mode=client_auth
requestWriter.Close();
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Console.WriteLine(response.StatusCode.ToString());
}
catch(WebException ex)
{
Console.WriteLine(ex.Message);
}
Anyone can give some insight on this?
Thanks!
James