Sign In Register

How can we help you today?

Start a new topic

GetTeamRequest Unity Issue

Hello,


I found another topic here from two years ago but did not have a solution similar to my issue here.


I am trying to get team members using the following code,

  

            new GetTeamRequest()
                .SetTeamId("00001")
                .Send((response) =>
                {
                    if (!response.HasErrors)
                    {

GSEnumerable<GetTeamResponse._Player> members = response.Members;
foreach (GetTeamResponse._Player user in members)
                                    
                        {
                                    IsOnline = (user.Online == true);
                                    fbID = user.ExternalIds.GetString("FB");
                                    ID = user.Id;
                                    friendDisplayName = user.DisplayName;
                                    PicUrl = "http://graph.facebook.com/" + fbID + "/picture?width=100&height=100";

                                    memberId.Resize(memberId.Length + 1);
                                    memberId.Set(memberId.Length - 1, ID);

                                    DisplayName.Resize(DisplayName.Length + 1);
                                    DisplayName.Set(DisplayName.Length - 1, friendDisplayName);

                                    memberPhotoLink.Resize(memberPhotoLink.Length + 1);
                                    memberPhotoLink.Set(memberPhotoLink.Length - 1, PicUrl);

                                    memberIsOnline.Resize(memberPhotoLink.Length + 1);
                                    memberIsOnline.Set(memberPhotoLink.Length - 1, IsOnline);

                                }

I receive all info needed as JsonString but all actual values return empty values, I have a similar code to this for JoinTeamRequest and I do receive all team members properly. but this one seems like it does not work.


thank you


Hi Naser,


Are you getting the same results when using the Test Harness?


-Pádraig

Test harness works fine, on Unity3d, response.JSONString works well too, but cannot get the variables in my code to have a value.

, I use the same exact code for Join team request and it works flawless, I also get all the variable upon JoinTeamResponse. I Attached a picture of the JSONstring response from GetTeamRequest.

Login to post a comment