hello @ePirat, and thank you for your replay.
i’m using a library i made in order to learn Oauth and twitter verification process.
i don’t really understand what is going on i can send any type of status update with arabic language and also those who has the character “:” or “*” but once i’m combine them together i receive the 401 error.
here is my implementation of Oauth signature Generator in c#:
protected string GenerateSignture(Method method, IDictionary<string, string> prms)
{
StringBuilder baseStrBu = new StringBuilder();
baseStrBu.Append(method.ToString().ToUpper() + "&");
baseStrBu.Append(Uri.EscapeDataString(URLResource) + "&");
foreach (var item in prms)
{
if (string.IsNullOrEmpty(item.Value.Trim())) continue;
baseStrBu.Append(Uri.EscapeDataString(item.Key + "=" + item.Value + "&"));
}
string baseStr = baseStrBu.ToString().Substring(0, baseStrBu.Length - 3);
HMACSHA1 hasher = new HMACSHA1(new UTF8Encoding().GetBytes(
Uri.EscapeDataString(auth.OauthConsumerSecret) + "&" +
Uri.EscapeDataString(auth.AccessToken.OauthTokenSecret)));
string signatureString = Convert.ToBase64String(
hasher.ComputeHash(new UTF8Encoding().GetBytes(baseStr)));
return signatureString;
}