@@ -14,6 +14,14 @@ export type ProfileMap = {
1414 userID ?: string | null ;
1515 email ?: string | null ;
1616 name ?: string | null ;
17+ refreshDate ?: number | null ;
18+ friendIDs ?: Array < string > | null ;
19+ birthday ?: number | null ;
20+ ageRange ?: { min : number ; max : number } | null ;
21+ hometown ?: { id : string ; name : string } | null ;
22+ location ?: { id : string ; name : string } | null ;
23+ gender ?: string | null ;
24+ permissions ?: Array < string > | null ;
1725} ;
1826
1927/**
@@ -63,6 +71,58 @@ class FBProfile {
6371 */
6472 imageURL ?: string | null ;
6573
74+ /**
75+ * The last time the profile data was fetched.
76+ */
77+ refreshDate ?: Date | null ;
78+
79+ /**
80+ * A list of identifiers of the user’s friends.
81+ * IMPORTANT: This field will only be populated if your user has granted your application the 'user_friends' permission and
82+ * limited login flow is used on iOS
83+ */
84+ friendIDs ?: Array < string > | null ;
85+
86+ /**
87+ * The user’s birthday.
88+ * IMPORTANT: This field will only be populated if your user has granted your application the 'user_birthday' permission and
89+ * limited login flow is used on iOS
90+ */
91+ birthday ?: Date | null ;
92+
93+ /**
94+ * The user’s age range.
95+ * IMPORTANT: This field will only be populated if your user has granted your application the 'user_age_range' permission and
96+ * limited login flow is used on iOS
97+ */
98+ ageRange ?: { min : number ; max : number } | null ;
99+
100+ /**
101+ * The user’s hometown.
102+ * IMPORTANT: This field will only be populated if your user has granted your application the 'user_hometown' permission and
103+ * limited login flow is used on iOS
104+ */
105+ hometown ?: { id : string ; name : string } | null ;
106+
107+ /**
108+ * The user’s location.
109+ * IMPORTANT: This field will only be populated if your user has granted your application the 'user_location' permission and
110+ * limited login flow is used on iOS
111+ */
112+ location ?: { id : string ; name : string } | null ;
113+
114+ /**
115+ * The user’s gender.
116+ * IMPORTANT: This field will only be populated if your user has granted your application the 'user_gender' permission and
117+ * limited login flow is used on iOS
118+ */
119+ gender ?: string | null ;
120+
121+ /**
122+ * The user’s granted permissions.
123+ */
124+ permissions ?: Array < string > | null ;
125+
66126 constructor ( profileMap : ProfileMap ) {
67127 this . firstName = profileMap . firstName ;
68128 this . lastName = profileMap . lastName ;
@@ -74,6 +134,16 @@ class FBProfile {
74134 this . email = profileMap . email ;
75135 }
76136 this . name = profileMap . name ;
137+ this . refreshDate = profileMap . refreshDate
138+ ? new Date ( profileMap . refreshDate )
139+ : null ;
140+ this . friendIDs = profileMap . friendIDs ;
141+ this . birthday = profileMap . birthday ? new Date ( profileMap . birthday ) : null ;
142+ this . ageRange = profileMap . ageRange ;
143+ this . hometown = profileMap . hometown ;
144+ this . location = profileMap . location ;
145+ this . gender = profileMap . gender ;
146+ this . permissions = profileMap . permissions ;
77147 Object . freeze ( this ) ;
78148 }
79149
0 commit comments