Ejemplo n.º 1
0
        public async Task <FacebookAccount> GetAccountAsync(string accessToken)
        {
            var response = await _facebookClient.GetAsync <dynamic>(
                accessToken, "me", "fields=id,name,first_name,last_name");

            if (response == null)
            {
                throw new Exception("FacebookAccount not found. ");
            }

            FacebookAccount facebookAccount = _modelMapper.GetFacebookAccount(response);

            return(facebookAccount);
        }