public Profile CurrentProfile()

in Facebook.Unity.IOS/IOSWrapper.cs [290:346]


        public Profile CurrentProfile()
        {
            String profileString = IOSWrapper.IOSFBCurrentProfile();
            if (String.IsNullOrEmpty(profileString))
            {
                return null;
            }
            try
            {
                IDictionary<string, string> profile = Utilities.ParseStringDictionaryFromString(profileString);
                string userID;
                string firstName;
                string middleName;
                string lastName;
                string name;
                string email;
                string imageURL;
                string linkURL;
                string friendIDs;
                string birthday;
                string gender;
                profile.TryGetValue("userID", out userID);
                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;
            }
        }