【发布时间】:2014-11-15 15:48:48
【问题描述】:
我知道这里被问了很多,但我找不到合适的答案。
我正在使用Facebook SDK v3.18
我只是想获取用户好友列表和他们的照片。
到目前为止我已经尝试过:
登录:
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];
获取用户的好友列表和他们的照片:
[FBRequestConnection startWithGraphPath:@"/me/friends?fields=name,picture"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
}];
但答案是:
{
data = (
);
summary = {
"total_count" = 1216;
};
}
并且不显示我朋友的名字或图片:/
请帮我解释一下。
提前致谢!
【问题讨论】:
标签: ios objective-c iphone facebook facebook-graph-api