我使用下面的 Objective-c 代码从 facebook 检索朋友列表、id 和生日,这对于朋友列表和 id 工作正常,但返回朋友生日的 null 值。
FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
NSDictionary* result,
NSError *error) {
NSArray* friends = [result objectForKey:@"data"];
NSLog(@"Found: %i friends", friends.count);
for (NSDictionary<FBGraphUser>* friend in friends) {
NSLog(@"I have a friend named %@ with id %@ with Birthdate %@", friend.name, friend.id, friend.birthday);
}
}];
我还为friend_birthday设置了权限,但它仍然为朋友的生日返回空值。谁能帮我检索朋友的生日而不是空值?提前致谢