Reputation: 1
i am using this code for getting Facebook friend list in iOS sdk 8.1.
FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
NSDictionary* result,
NSError *error) {
NSArray* friends = [result objectForKey:@"data"];
NSLog(@"Found: %lu friends", (unsigned long)friends.count);
for (NSDictionary<FBGraphUser>* friend in friends) {
NSLog(@"I have a friend named %@ with id %@", friend.name, friend.objectID);
}
}];
but it returns null value.
Upvotes: 0
Views: 359
Reputation: 31479
Since Graph API v2.0, the /{user_id}/friends
endpoint does only return those friends who also gave your app the respective permission.
See
The /me/friends endpoint no longer includes the full list of a person's friends. Instead, it now returns the list of that person's friends who are also using your app.
Upvotes: 1