Facebook.OAuthContext.Authenticate C# (CSharp) Method

Authenticate() public method

Authenticates with a code given synchronously. See for more information.
The operation took longer then . either or is null.
public Authenticate ( [ code, [ redirectUri ) : void
code [ a verification string passed in the query string argument code when redirecting to
redirectUri [ a url which was passed to as next url argument. It should not contain query part.
return void
        public void Authenticate([NotNull] string code, [NotNull] string redirectUri)
        {
            if (String.IsNullOrEmpty(code))
                throw FacebookApi.Nre("code");
            if (String.IsNullOrEmpty(redirectUri))
                throw FacebookApi.Nre("redirectUri");

            string contentType;
            string json = NewApiClient().Request(
                c_oauthTokenUrl,
                HttpVerb.Post,
                new Dictionary<string, string>
                {
                    {"client_id", _appId},
                    {"client_secret", _appSecret},
                    {"redirect_uri", redirectUri},
                    {"code", code}
                },
                out contentType);

            ParseAuthResult(contentType, json);
        }