FaceBook launched new API from version 2.0 and asking users to upgrade to new SDK.
In my iOS application (which is not a game), user signs in using Facebook. In side the application I have an option to show all the FB friends of the user (friends who are not using the application).
I tried the below code which returns the friends who are using the application:
[FBRequestConnection startWithGraphPath:@"/me/friends"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
NSLog(@"%@", result);
}];
And below code is not working in my application, because my app is not a game. As per FB, below code works only for Games.
FBRequest *request = [FBRequest requestWithGraphPath:@"me/invitable_friends"
parameters:@{@"fields":@"name,installed,first_name"}
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBRequestConnection *connection,
id result,
NSError *error){
NSLog(@"%@", result);
}];
Is there any other alternative to fetch the friends of the user?