private OAuthCredential GetOAuthCredential(Uri uri, Dictionary<string, string> parameter, out NameValueCollection ret)
{
var req = this.CreateRequest("POST", uri, parameter, false);
AppendOAuthInfo(req, parameter);
var header = new Dictionary<string, string>();
string body;
var code = GetResponse(req, out body, header, false);
if (code == HttpStatusCode.OK)
{
ret = ParseQueryString(body);
return new OAuthCredential(this.Credential.Consumer, ret["oauth_token"], ret["oauth_token_secret"]);
}
else
{
throw new Exception(body); // response body
}
}