[英]Facebook graph api v2.4 not returning birthday
I'm trying to get facebook user birthday. 我想让facebook用户过生日。 So far I am successfully getting user first_name, last_name,email,name,gender except birthday
到目前为止,我成功获得用户first_name,last_name,电子邮件,姓名,性别除了生日
self.loginButton.publishPermissions = @[@"basic_info", @"email", @"user_friends"];
self.loginButton.delegate =self;
FBSDKLoginManager *loginManager = [[FBSDKLoginManager alloc] init];
loginManager.loginBehavior = FBSDKLoginBehaviorSystemAccount;
[loginManager logInWithReadPermissions:@[@"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:@{@"fields" : @"first_name, last_name,email,name,gender,birthday"}]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
}
}
Give the Permission of user_birthday
in your code, 在代码中给出
user_birthday
的权限,
self.loginButton.publishPermissions = @[@"basic_info", @"email", @"user_friends",@"user_birthday"];
Without above permission in V 2.4 you get only name
and id
from facebook, 如果没有V 2.4的上述许可,您只能从Facebook获得
name
和id
,
Check Facebook developer site Graph Exploror 查看Facebook开发者网站Graph Exploror
Without permission of user_birthday
, got an error, 未经
user_birthday
许可,出错,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.