我正在开发一个应用程序,现在我已经在其中实现了 Facebook 我想在我的应用程序中获取 Facebook 用户个人资料图片和生日。我搜索了网络,但所有教程都是 2 或 3 岁。
我已经设置了权限,例如..
loginButton.readPermissions=@[@"public_profile", @"email", @"user_friends",@"user_birthday",@"user_location"];
并用代码获取
if ([FBSDKAccessToken currentAccessToken]) {
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:nil]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error) {
NSLog(@"fetched user:%@", result);
}
但输出是
fetched user:{
email = "XYZ@gmail.com";
"first_name" = XYZ;
gender = male;
id = xxxxxxxxxxx;
"last_name" = ABC;
link = "https://www.facebook.com/app_scoped_user_id/xxxxxxxxx/";
locale = "en_GB";
name = "XYZ ABC";
timezone = "5.5";
"updated_time" = "2015-04-08T06:57:20+0000";
verified = 1;
}
为什么我没有收到生日和头像信息?