Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
simplearcadegamers

Junior Member
Registered:
Posts: 5
Reply with quote  #1 
Hi developers, i implemented Photon with Facebook in unity to do Friends List and chat. And i found one asset, when i login i got this error that dictionary is null Here is the Asset link and error.

https://github.com/vironitcom/Unity_PlayWithFriendsKIT


private void GetInfoForChat(IResult result)
    {
        UserID = result.ResultDictionary["id"].ToString();
        var dictionary = (Dictionary<string, object>)Facebook.MiniJSON.Json.Deserialize(result.RawResult);
        var friendsDict = (Dictionary<string, object>)dictionary["friends"];
        var friendsList = (List<object>)friendsDict["data"];
        UserFriendsID = new List<string>();
        UserFriendsName = new Dictionary<string, string>();
        foreach (var dict in friendsList)
        {
            UserFriendsID.Add(((Dictionary<string, object>)dict)["id"].ToString());
            UserFriendsName.Add(((Dictionary<string, object>)dict)["id"].ToString(), ((Dictionary<string, object>)dict)["name"].ToString());
        }
        ///Start chat
        Connect();
    }


and the error was Keynoyfound. Previous it is working well.

Thanks, am strugling in this.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.