title: facebook Access Token 400 bad request
body: <p>I am using following code to retrieve facebook accessToken </p>
  
  <pre><code>string url = "https://graph.facebook.com/oauth/access_token?" +
                           "client_id={0}" +
                           "&amp;redirect_uri={1}" +
                           "&amp;client_secret={2}" +
                           "&amp;code={3}";
              url = string.Format(url, clientId, redirectUri.EncodeUrl(), clientSecret, code);
              //Create a webrequest to perform the request against the Uri
              WebRequest request = WebRequest.Create(url);
              try
              {
                  //read out the response as a utf-8 encoding and parse out the access_token
                  using (WebResponse response = request.GetResponse())
                  {
                      using (Stream stream = response.GetResponseStream())
                      {
                          //string urlRedirects = response.ResponseUri.ToString();
                          Encoding encode = Encoding.GetEncoding("utf-8");
                          if (stream != null)
                          {
                              StreamReader streamReader = new StreamReader(stream, encode);
                              string accessToken = streamReader.ReadToEnd().Replace("access_token=", "");
                              streamReader.Close();
                              response.Close();
                              return accessToken;
                          }
                      }
                  }
              }
              catch
              {
                  return null;
              }
  </code></pre>
  
  <p>however I am constantly receiving this ambiguous error message </p>
  
  <pre><code>{
  "error": {
  "message": "Error validating verification code.",
  "type": "OAuthException",
  "code": 100
  }
  }
  </code></pre>
  
  <p>I checked the code 100 "Invalid parameter" doesn't means much to me at all.</p>
  
  <p>anyone have had similar problem?</p>