我想提取正在使用我的应用的朋友的生日;我无法访问它。
FBRequest *friendRequest = [FBRequest requestForGraphPath:@"me/friends?fields=name,birthday"];
[friendRequest startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
NSArray *data = [result objectForKey:@"data"];
for (FBGraphObject<FBGraphUser> *friend in data)
{
NSLog(@"%@:%@:%@", [friend id], [friend name], [friend birthday]);
}
}
didLoad的权限:
self.loginButton.readPermissions = @[@"public_profile", @"email", @"user_friends", @"friends_birthday"];
答案 0 :(得分:2)
facebook正在删除Facebook V 2.1中朋友的一些可访问性。朋友生日也被删除了。所以你无法得到朋友生日的日期。
已删除所有friends_ *权限的列表。它们包括:
friends_about_me
friends_actions.books
friends_actions.fitness
friends_actions.music
friends_actions.news
friends_actions.video
friends_actions:APP_NAMESPACE
friends_activities
friends_birthday
friends_checkins
friends_education_history
friends_events
friends_games_activity
friends_groups
friends_hometown
friends_interests
friends_likes
friends_location
friends_notes
friends_online_presence
friends_photos
friends_questions
friends_relationships
friends_relationship_details
friends_religion_politics
friends_status
friends_subscriptions
friends_videos
friends_website
friends_work_history
答案 1 :(得分:1)
Facebook限制了Facebook V 2.1中朋友列表和细节的一些功能。您只能获取:
ID
姓名
仅限图片