0

// I have already got approval from facebook

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                                    initWithGraphPath:@"/me/friends"
                                    parameters:nil HTTPMethod:@"GET"];

       [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
                                            NSArray* friends = [result objectForKey:@"data"];
                                            for (NSDictionary* friend in friends) {
                                                NSLog(@"I have a friend named %@",[friend objectForKey:@"name"]);
                                            }
                                        }];
                                    }
                                }];

//Please review

andyrandy
  • 72,880
  • 8
  • 113
  • 130

1 Answers1

0

You don´t need approval for the user_friends permission, you only need to authorize users with it to get access to friends. You´ve already done that correctly if you get the friend count.

To your main question: You can only get access to friends who authorized your App with the user_friends permission too. That´s why the list is empty.

More information: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130