使用 Facebook iOS SDK 获取朋友的朋友
是否可以使用 facebook ios sdk 获取我朋友的朋友的信息? 如果可以请举个例子。
使用 Graph api @'[friend_id]/friends
" 请求不起作用。
'code' [facebook requestWithGraphPath:@"[friend_id]/friends" andDelegate:self];'code'
i try this code but it returns
Error:facebookErrDomain error 10000 where'code'
facebook = [[ Facebook alloc] initWithAppId:app_id];
NSArray *permissions = [NSArray arrayWithObjects:@"I try all permissions"];
[facebook authorize:permissions delegate:self]; 'code'
用户已登录,有关该朋友的所有信息均可用
Is it possible to get information about friends of my friends using facebook ios sdk?
Please.If it is possible give an example.
request with Graph api @'[friend_id]/friends
" does not work.
'code' [facebook requestWithGraphPath:@"[friend_id]/friends" andDelegate:self];'code'
i try this code but it returns
Error:facebookErrDomain error 10000 where'code'
facebook = [[ Facebook alloc] initWithAppId:app_id];
NSArray *permissions = [NSArray arrayWithObjects:@"I try all permissions"];
[facebook authorize:permissions delegate:self]; 'code'
user is logged in, All information about this friend is available
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很确定这是不可能的,您需要朋友的数据访问权限才能获取他们的朋友数据。这与 Facebook 的访问权限有关,出于某些原因,这很好。即使这种数据保护机制扰乱了您的商业想法;)
I'm quite sure this is not possible, you'ld need data access privs of the friends to get their friends data. this has to do with the access rights on fb and this is good for some reasons it is like it is. even if this data protection mechanism disturbs your business idea ;)
如果你想捕获好友信息,你必须:
Facebook *facebookObject = [[Facebook alloc] init];
NSArray *permissions = [NSArray arrayWithObjects:@"publish_stream ", @"offline_access",nil];
[facebookObjectauthorize:APP_ID requests:permissions delegate:self];
[facebookObject requestWithGraphPath:@" me/friend" andDelegate:self];
- (void)request:(FBRequest *)request didLoad:(id)result
您捕获的结果必须是 NSDictionnary。
If you want catch friend informations you must :
Facebook *facebookObject = [[Facebook alloc] init];
NSArray *permissions = [NSArray arrayWithObjects:@"publish_stream", @"offline_access",nil];
[facebookObject authorize:APP_ID permissions:permissions delegate:self];
[facebookObject requestWithGraphPath:@"me/friend" andDelegate:self];
- (void)request:(FBRequest *)request didLoad:(id)result
You catch the result who must be a NSDictionnary.