Facebook Graph API for friends list returns nil on iOS

I am trying to access my Facebook friends list through this code, and the received JSON does not return any data.

FBRequest *request = [FBRequest requestWithGraphPath:@"me/friends" parameters:nil HTTPMethod:@"GET"];

I set permissions like this (I use PARSE)

[PFFacebookUtils linkUser:[PFUser currentUser] permissions:@[@"user_friends"] block:^(BOOL succeeded, NSError *error)

Did I miss something?

+2
source share
1 answer

Are you using the V2 API? Recently, big changes have occurred recently, so this API call now returns only friends who used the application that makes the request. In other words, you cannot get the whole list of friends, only friends who also use the corresponding application.

More details here:

https://developers.facebook.com/docs/graph-api/reference/v2.0/user/friends

1.0 2.0, .

SDK 2.0 iOS, FBRequest API .

, ,

[request overrideVersionPartWith:@"v1.0"];

v1.0, :

2.0 ( ) v1.0 .

, , .

, , , , SDK Facebook, , . , , , Facebook , , , .

API 3.13.1.

, , , . , .

, . 30 2014 , API v1.0 , SDK - . , , API 1.0 30 .

+7

Source: https://habr.com/ru/post/1542158/


All Articles