400 bad request error twitterizer c#


#1

Hello!

I have such kind of problem. Here’s the code of my application that worked just fine several months ago, but now I get this error described in the title of the message… Please, help… (used Twitterizer2.dll)

OAuthTokenResponse tokenResponse = OAuthUtility.GetRequestToken(clientID, clientSecret, string.Format("{0}/registration/?id=4", curUrl));
context.Response.Redirect(string.Concat("https://api.twitter.com/oauth/authenticate?oauth_token=", tokenResponse.Token));

....

if (!string.IsNullOrEmpty(context.Request["oauth_token"]))
{
   User user = new User();
    OAuthTokenResponse tokens = OAuthUtility.GetAccessToken(clientID, clientSecret, context.Request["oauth_token"], context.Request["oauth_verifier"]); 
     string accessToken = tokens.Token;
     userAccessSecret = tokens.TokenSecret;
     string userName = tokens.ScreenName;
     long userID = (long)tokens.UserId;
     HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(string.Concat("https://api.twitter.com/1/users/show.json?screen_name=", userName));
	HttpWebResponse response = (HttpWebResponse)request.GetResponse();
}

Having {curUrl}/registration/?id=4&oauth_token=…&oauth_verifier=… I get this error… I don’t know what to do…