在我的应用程序中,当我检索用户位置时,它返回一个 Null 值,并且生日也返回 Null 值,代码如下,
- (void)populateUserDetails {
if (FBSession.activeSession.isOpen) {
[[FBRequest requestForMe] startWithCompletionHandler:
^(FBRequestConnection *connection, NSDictionary<FBGraphUser> *user, NSError *error) {
if (!error) {
self.userNameLabel.text = user.name;
self.userProfileImage.profileID = [user objectForKey:@"id"];
self.userbirthday.text=user.birthday;
self.userloc=[[user objectForKey:@"location"] objectForKey:@"name"];
}
}];
}
}
代码有什么问题?请帮我解决这个问题?