Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 缺少GPPSignIn生日属性_Ios_Iphone_Xcode_Google Api_Google Plus - Fatal编程技术网

Ios 缺少GPPSignIn生日属性

Ios 缺少GPPSignIn生日属性,ios,iphone,xcode,google-api,google-plus,Ios,Iphone,Xcode,Google Api,Google Plus,我想用以下代码获取用户的生日: GTLQueryPlus *query = [GTLQueryPlus queryForPeopleGetWithUserId:@"me"]; GTLServicePlus* plusService = [[GTLServicePlus alloc] init]; plusService.retryEnabled = YES; [plusService setAuthorizer:authObj]; [plusService

我想用以下代码获取用户的生日:

    GTLQueryPlus *query = [GTLQueryPlus queryForPeopleGetWithUserId:@"me"];
    GTLServicePlus* plusService = [[GTLServicePlus alloc] init];
    plusService.retryEnabled = YES;
    [plusService setAuthorizer:authObj];
    [plusService executeQuery:query
            completionHandler:^(GTLServiceTicket *ticket,
                                GTLPlusPerson *person,
                                NSError *error) {
                if (error) {
                    GTMLoggerError(@"Error: %@", error);
                } else {
                    NSString *birthDay = [person birthday];
                }
            }];
这是范围:

googleSignIn.scopes = @[ kGTLAuthScopePlusLogin ];
我得到了所有的信息,但是生日是零。 如果我在运行时检查对象,它没有生日键值对

有人知道怎么解决吗


感谢

如果在用户的配置文件设置中公开共享了生日字段,则支持这些查询的仅包括生日字段。这适用于Person资源中的所有字段。唯一可保证的值是姓名、个人资料图像、个人资料链接和年龄范围,这可能适用于您的目的。

如果查询/服务中没有生日,则您无法提取它。