objective c - Facebook iOS sdk friends list returns empty -
i using code 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); (nsdictionary<fbgraphuser>* friend in friends) { nslog(@"i have friend named %@ id %@", friend.name, friend.objectid); } }];
but returns null value.
since graph api v2.0, /{user_id}/friends
endpoint return friends gave app respective permission.
see
the /me/friends endpoint no longer includes full list of person's friends. instead, returns list of person's friends using app.
Comments
Post a Comment