Home Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application
Reply: 0

Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application

user890
1#
user890 Published in April 26, 2018, 9:36 am

I am trying to get my friend name and ids with Graph API v2.0, but data returns empty:

{
  "data": [
  ]
}

When I was using v1.0, everything was OK with the following request:

FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
                                              NSDictionary* result,
                                              NSError *error) {
    NSArray* friends = [result objectForKey:@"data"];
    NSLog(@"Found: %i friends", friends.count);
    for (NSDictionary<FBGraphUser>* friend in friends) {
        NSLog(@"I have a friend named %@ with id %@", friend.name, friend.id);
    }
}];

But now I cannot get friends!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.680957 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO