/// <summary> /// Gets the friends list. /// </summary> public void GetFriends() { if (!NetworkManager.THIS.IsLoggedIn) { return; } Debug.Log("GetFriends"); if (friendsManager != null) { friendsManager.GetFriends((dic) => { FacebookManager.THIS.AddFriend(FacebookManager.THIS.GetCurrentUserAsFriend());//1.4.4 foreach (var item in dic) { FriendData friend = new FriendData() { FacebookID = item.Key, userID = item.Value }; // Debug.Log(friend.userID); FacebookManager.THIS.AddFriend(friend);//1.4.4 } FacebookManager.THIS.GetFriendsPicture(); PlaceFriendsPositionsOnMap(); }); } }
/// <summary> /// Gets the friends list. /// </summary> public void GetFriends() { if (!NetworkManager.THIS.IsLoggedIn) { return; } if (friendsManager != null) { friendsManager.GetFriends(dic => { foreach (var item in dic) { FriendData friend = new FriendData { FacebookID = item.Key, userID = item.Value }; Debug.Log(friend.userID); FacebookManager.THIS.AddFriend(friend); //2.1.2 // Debug.Log (" " + item.Key + " == " + item.Value); } FacebookManager.THIS.GetFriendsPicture(); PlaceFriendsPositionsOnMap(); }); FacebookManager.THIS.AddFriend(FacebookManager.THIS.GetCurrentUserAsFriend()); //2.2.2 } }