This is my code
Dim nonce = New Random().[Next](&H0, &H7FFFFFFF).ToString(“X8”)
Dim timestamp = CInt((DateTime.UtcNow - New DateTime(1970, 1, 1)).TotalSeconds).ToString()
Dim Header As New System.Text.StringBuilder(" OAuth ")
Header.Append(" oauth_nonce=""").Append(nonce.ToString).Append(""",")
Header.Append(" oauth_callback=""").Append("http://www.MyDomain.com/Callback.aspx".EncodeRFC3986).Append(""",")
Header.Append(" oauth_signature_method=""""HMAC-SHA1"""",")
Header.Append(" oauth_timestamp=""").Append(timestamp.ToString()).Append(""",")
Header.Append(" oauth_consumer_key=""").Append(CONSUMER_KEY).Append(""",")
Header.Append(" oauth_signature=""").Append(CONSUMER_SECRET).Append(""",")
Header.Append(" oauth_version=""1.0""")
Dim Wc As New System.Net.WebClient
Wc.Headers.Add("content-type", "application/x-www-form-urlencoded")
Wc.Headers.Add("content-type", Header.ToString)
Return Wc.DownloadString("https://api.twitter.com/oauth/request_token")
cause exception (The remote server returned an error: (401) Unauthorized.)
The domain MyDomain only work in local mode, I not have the domain registered