public override Profile CurrentProfile()

in Facebook.Unity/Mobile/Android/AndroidFacebook.cs [220:276]


        public override Profile CurrentProfile()
        {
            String profileString = this.androidWrapper.CallStatic<string>("GetCurrentProfile");
            if (!String.IsNullOrEmpty(profileString))
            {
                try
                {
                    IDictionary<string, string> profile = Utilities.ParseStringDictionaryFromString(profileString);
                    string id;
                    string firstName;
                    string middleName;
                    string lastName;
                    string name;
                    string email;
                    string imageURL;
                    string linkURL;
                    string friendIDs;
                    string birthday;
                    string gender;
                    profile.TryGetValue("userID", out id);
                    profile.TryGetValue("firstName", out firstName);
                    profile.TryGetValue("middleName", out middleName);
                    profile.TryGetValue("lastName", out lastName);
                    profile.TryGetValue("name", out name);
                    profile.TryGetValue("email", out email);
                    profile.TryGetValue("imageURL", out imageURL);
                    profile.TryGetValue("linkURL", out linkURL);
                    profile.TryGetValue("friendIDs", out friendIDs);
                    profile.TryGetValue("birthday", out birthday);
                    profile.TryGetValue("gender", out gender);

                    UserAgeRange ageRange = UserAgeRange.AgeRangeFromDictionary(profile);
                    FBLocation hometown = FBLocation.FromDictionary("hometown", profile);
                    FBLocation location = FBLocation.FromDictionary("location", profile);
                    return new Profile(
                        userID,
                        firstName,
                        middleName,
                        lastName,
                        name,
                        email,
                        imageURL,
                        linkURL,
                        friendIDs?.Split(','),
                        birthday,
                        ageRange,
                        hometown,
                        location,
                        gender);
                }
                catch (Exception)
                {
                    return null;
                }
            }
            return null;
        }