简体   繁体   English

Facebook图表api v2.4没有返回生日

[英]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获得nameid

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.

相关问题 Facebook iOS SDK - 在Graph API v2.4中获取好友列表 - Facebook iOS SDK - get friends list in Graph API v2.4 使用Facebook iOS SDK API v2.4获取Facebook登录用户的兴趣 - Fetch Facebook logged-in user's Interest using Facebook iOS SDK API v2.4 我正在尝试使用图表API v2.4获取我的朋友的名字和ID,但是数据返回空: - I am trying to get my friend name and ids with graph api v2.4, but data returns empty: FBSDKLog:从Graph API v2.4开始,针对/ me / permissions的GET请求应包含一个明确的“字段”参数 - FBSDKLog: starting with Graph API v2.4, GET requests for /me/permissions should contain an explicit “fields” parameter 无法在iOS中使用具有自定义按钮的api v2.4登录到Facebook - Not able to login with facebook using api v2.4 with custom button in ios 在Facebook graph API 2.1中仅选择生日 - Select only birthday in Facebook graph API 2.1 Facebook Graph API v2.3 查询@"me/taggable_friends" 提供所有没有生日的朋友的详细信息。 如何获取朋友生日的详细信息? - Facebook Graph API v2.3 query @"me/taggable_friends" give details of all friends without birthday . how to get friends details with their birthday? 使用Graph API的iOS弃用的权限-facebook朋友生日 - iOS -deprecated permission-facebook friends birthday using Graph API Facebook图形API链接参数返回nil - Facebook graph API link parameter returning nil Facebook的图形API不返回所有数据 - facebook graph api not returning all data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM