SHARE
TWEET

Untitled

a guest Jun 25th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. KeyNotFoundException: The given key was not present in the dictionary.
  2. System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
  3. ChatManager.GetInfoForChat (IResult result) (at Assets/GameWithFriends/Scripts/Managers/ChatManager.cs:111)
  4. FacebookExampleManager.<AuthCallback>m__0 (IGraphResult LoginResult) (at Assets/GameWithFriends/Scripts/Managers/FacebookExampleManager.cs:77)
  5. Facebook.Unity.AsyncRequestString+<Start>d__9.MoveNext ()
  6. UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
  7.      
  8. private void GetInfoForChat(IResult result)
  9.     {
  10.         UserID = result.ResultDictionary["id"].ToString();
  11.         var dictionary = (Dictionary<string, object>)Facebook.MiniJSON.Json.Deserialize(result.RawResult);
  12.         var friendsDict = (Dictionary<string, object>)dictionary["friends"];
  13.         var friendsList = (List<object>)friendsDict["data"];
  14.         UserFriendsID = new List<string>();
  15.         UserFriendsName = new Dictionary<string, string>();
  16.         foreach (var dict in friendsList)
  17.         {
  18.             UserFriendsID.Add(((Dictionary<string, object>)dict)["id"].ToString());
  19.             UserFriendsName.Add(((Dictionary<string, object>)dict)["id"].ToString(), ((Dictionary<string, object>)dict)["name"].ToString());
  20.         }
  21.         ///Start chat
  22.         Connect();
  23.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top