I am able to retrieve all the required properties for all the group. To get the group image I have created another method. I am calling this method inside above all groups loop. Of course I am getting output and show the group name along with Image, but it is taking close to 20-25 secs since getGroupImage method is calling inside all groups loop. My actual question is how to get the group image along with the group properties. If I see in the documentation there is no property mentioned about group image. How to get the group properties along with image in single call? This is how i am getting group pictures

public async Task<List<GroupPic>> GetGroupPhotos(string accessToken,string[] groupIds) {
            List<GroupPic> pics = new List<GroupPic>();
            foreach (var groupId in groupIds)
                var k = await GetGroupPicture(accessToken, groupId);
                pics.Add(new GroupPic { groupPic = k, groupId = groupId });
            return pics;

here for groupIds parameter I am passing all groupIds at once and looping them (this is slightly different than above I have mentioned). I am calling this method once I get the group details. So user will first see group details after few seconds pictures will get loaded.

  • can you share a code snippet of this ? How you are getting a group and the photo of it ? – Gautam Sheth Apr 10 '18 at 11:09
  • See my edited question – Mihir Apr 10 '18 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.