0

I'm trying to get the user's friend list with iOS Facebook SDK 3.1 but I'm getting an empty list as a result. This is what I'm doing:

FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
                                              NSDictionary* result,
                                              NSError *error) {
    NSArray* friends = [result objectForKey:@"data"];
    for (NSDictionary<FBGraphUser>* friend in friends) {
        NSLog(@"NAME %@", friend.name);
    }
}];

I'm getting this:

{
data =     (
); }

This app has also Facebook Login and it works OK. What am I missing?

Thanks in advance!

mxch
  • 835
  • 2
  • 10
  • 20
  • You forgot to search. In Facebook API v2.0 you will only get back friends that are using your app. Not all friends. – WizKid Jun 03 '14 at 01:51
  • 1
    possible duplicate of [Facebook Graph Api v2.0 me/friends returns empty, or only friends who also use my app](http://stackoverflow.com/questions/23417356/facebook-graph-api-v2-0-me-friends-returns-empty-or-only-friends-who-also-use-m) – WizKid Jun 03 '14 at 01:51
  • Thanks and sorry for the duplicate. – mxch Jun 03 '14 at 01:53

0 Answers0