Ejemplo n.º 1
0
        public async Task <UserProfileApiResponse> GetUserProfileAsync(string userID, List <UserProfileField> fields = null)
        {
            string queryFields = (fields == null) ? string.Join(",", AllFields) : string.Join(",", fields.Select(f => f.ToString()));
            string requestUrl  = $"{_FacebookGraphApiUrl}/{userID}?fields={queryFields}&access_token={_Credentials.PageToken}";

            return(await RequestHandler.GetAsync <UserProfileApiResponse>(requestUrl));
        }
Ejemplo n.º 2
0
        public async Task <MessengerProfileAPIResponse> GetSettingsAsync(List <MessengerProfileField> fields = null)
        {
            string queryFields = string.Empty;

            if (fields == null || fields.Count < 1)
            {
                queryFields = string.Join(",", AllFields);
            }
            else
            {
                queryFields = string.Join(",", fields.Select(f => f.ToString()));
            }

            string requestUrl = $"{MessengerProfileEndpoint}&fields={queryFields}";

            return(await RequestHandler.GetAsync <MessengerProfileAPIResponse>(requestUrl));
        }