NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"select uid,name,birthday_date from user where uid in (select uid2 from friend where uid1=me())", @"query",
nil];
[[StaticFacebook getFacebook] requestWithMethodName: @"fql.query"
andParams: params
andHttpMethod: @"POST"
andDelegate: self]
我正在使用上面的代码来获取朋友信息.....
但问题是我得到birth_day="null"
请给我解决方案.......
提前结束.....
答案 0 :(得分:0)
确保您已请求正确的访问权限以检索生日字段。
user_birthday - Provides access to the birthday with year as the birthday property
参考:https://developers.facebook.com/docs/authentication/permissions/
答案 1 :(得分:0)
像这样访问生日许可..
[facebookObj authorize:App_ID permissions:[NSArray arrayWithObjects:@"offline_access",@"publish_stream",@"user_birthday",@"user_events",@"read_stream",@"friends_likes", nil] delegate:self];