public static User GetInfo(this FacebookClient client, User user) { if (!string.IsNullOrEmpty(user.AccessToken)) { JsonObject info = client.Get("/me?fields=id,name,picture", new { access_token = user.AccessToken }) as JsonObject; foreach (var item in info) { if (item.Key.Equals("name")) { user.FullName = item.Value.ToString(); } if (item.Key.Equals("id")) { user.Id = item.Value as string; } if (item.Key.Equals("picture")) { user.PathImage = ((item.Value as JsonObject) .Where(k => k.Key == "data").FirstOrDefault().Value as JsonObject) .Where(k => k.Key == "url").FirstOrDefault().Value as string; } } } var pagetoken = client.GetPageToken("nonewa2017", user.AccessToken); var listcmd = client.GetCommentsByPostId("1658692860924904", user.AccessToken); var lstusers = client.GetListUserInfoByComment(listcmd, user.AccessToken); return(user); }