private async Task <FacebookAuthResult> GetUserInfoAsync(string accessToken)
        {
            var requestUrl = string.Format(ReadFbUserInfoUrl, accessToken);
            var response   = await _httpClientFactory.CreateClient().GetAsync(requestUrl);

            var parsedObject = JObject.Parse(await response.Content.ReadAsStringAsync());

            var result = new FacebookAuthResult();

            try
            {
                result.Email   = parsedObject["email"].ToString();
                result.Id      = parsedObject["id"].ToString();
                result.Success = true;
            }
            catch
            {
                result.Success = false;
            }

            return(result);
        }
        public FacebookProfile Authenticate(HttpRequest request = null)
        {
            FacebookOAuthClient facebookOAuthClient = new FacebookOAuthClient
            {
                AppId       = AppID,
                AppSecret   = AppSecret,
                RedirectUri = RedirectUri
            };

            Dictionary <string, object> oauthParams = new Dictionary <string, object>
            {
                {
                    "redirect_uri", RedirectUri
                }
            };

            FacebookAuthResult facebookAuthResult = SerilizationHelper.Deserialize <FacebookAuthResult>(facebookOAuthClient.ExchangeCodeForAccessToken(AuthCode, oauthParams).ToString());

            Token = facebookAuthResult.access_token;
            FacebookClient facebookClient = new FacebookClient(Token);

            return(SerilizationHelper.Deserialize <FacebookProfile>(facebookClient.Get("/me").ToString()));
        }