I know it have been asked a lot here, but I can't find a proper answer for that.
I am using Facebook SDK v3.18
I simply want to get user friends list and their pictures .
I've tried so far this:
Login:
FBLoginView *loginView =
[[FBLoginView alloc] initWithReadPermissions:
@[@"public_profile", @"email", @"user_friends"]];
// Align the button in the center horizontally
loginView.frame = CGRectOffset(loginView.frame, (self.view.center.x - (loginView.frame.size.width / 2)), (self.view.center.y - (loginView.frame.size.height / 2)));
[self.view addSubview:loginView];
Get user's friends list and their pictures:
[FBRequestConnection startWithGraphPath:@"/me/friends?fields=name,picture"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
}];
But the answer is:
{
data = (
);
summary = {
"total_count" = 1216;
};
}
And non for my friends name or pictures are shown :/
Please put some light for me on this.
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…