c# - (400) Bad Request error running asp.net site at local host -


I am preparing a website for Facebook data access and when I was delivering it to the local host: 4999 ports but Error occurs whenever the page loads

  public category FacebookLoginHelper {public dictionary & lt; String, & gt; GetAccessToken (string code, string field, string redirect URL) {dictionary & lt; String, & gt; Tokens = New Dictionary & lt; String, & gt; (); String Client ID = Facebook Application Present. APID; //FacebookContext.Current.AppId; String Client Secret = FacebookApplication.Current.AppSecret; String url = string.format ("https://graph.facebook.com/oauth/access_token?client_id={0}&redirect_uri={1}&client_secret={2}&code={3}& Scope = {4} ", customer ID, redirection URL, client secret, code, scope); HttpWebRequest request = WebRequest.Create (url) as HttpWebRequest; (HttpWebResponse response = Request.GETResponse () as HttpWebResponse) {StreamReader Reader = New Stream Reader (Response .GetrespensSstream ()); String retVal = reader.ReadToEnd (); Strings token in foreign currency (retivial split ('& amp;') {token.add (token. Springing (0, token.indexoff ("="), token. Springing (token.indexoff ("=") + 1, token Lang - token index ("=") - 1)); }} Return token; }}   

Now this error shows 400 in line: using (HTTP webbase response = request.Getterspons ()) as HTTP webbases

its What is the reason? Please help me

thanks

A 400 bad request error Facebook API when requested by you If the parameter is not valid for the request, you can try to manually paste the requested URL on your browser with the parameter, it should be displayed as JSON due to the error (for example, something like this :

  {"error": {"type": "OAuthException", "message": "redirect_uri not a full URI Is. RFC 3986. "}   

From that point, you are wrong you can test and fix it.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -