用facebook sdk,用facebook dev官网提供sample code
[FBRequestConnection startWithGraphPath:@"/me/friends"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
NSLog(@"result is %@",result);
NSArray* friends = [result objectForKey:@"data"];
NSLog(@"%@",[result objectForKey:@"summary"]);
if (friends.count==0) {
NSLog(@"is nil");
}
NSLog(@"friends is %@",friends);
for(NSDictionary<FBGraphUser>* friend in friends) {
NSLog(@"%@", friend);
}
}];
我取出来的friends都是nil,请问我哪里没注意到吗?