I have "Failed to validate oauth signature and token" error


(First, I’m poor at english. sorry.)

I’m using twitter api on VB 6.0

I finished generate parameters and signature. ( compared with example signature, and it works well. )

But server always returned “Failed to validate oauth signature and token” error.

I searched in web, and fixed timestamp function of my code. ( into UTC )

But server still returns same error.

I compared with another twitter api library sources, but I can’t find any problems in my code. ( It took a week )

I tried HEADER type send, POST type send, GET type send. but dosn’t works.

Here’s my source code.

Query.Param("oauth_consumer_key") = consumerKey
Query.Param("oauth_nonce") = nonce
Query.Param("oauth_signature_method") = "HMAC-SHA1"
Query.Param("oauth_timestamp") = times
Query.Param("oauth_version") = "1.0"

signature = Query.BuildSort
signature = Method & "&" & RFC2616(URL) & "&" & RFC2616(signature)
signature = Base64_HMACSHA1(signature, consumerSecret)

Query.Param("oauth_signature") = signature

“Query” is parameter class I created. BuildSort function returns RFC2616 encoded string like “a=b&c=d%27…”.
nonce is random string, times is Timestamp of UTC.

How can i fix this problem? ( I send with WinHTTP )