开发者

Getting friends of friends with Facebook iOS SDK

Is it possible to get information about friends of my friends using facebook ios sdk? Please.If开发者_如何学JAVA 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


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 ;)


If you want catch friend informations you must :

  • Alloc and Init a Facebook object

Facebook *facebookObject = [[Facebook alloc] init];

  • Check permissions

NSArray *permissions = [NSArray arrayWithObjects:@"publish_stream", @"offline_access",nil];

  • Authorize facebook

[facebookObject authorize:APP_ID permissions:permissions delegate:self];

  • After that you can used

[facebookObject requestWithGraphPath:@"me/friend" andDelegate:self];

  • In delegate methods

- (void)request:(FBRequest *)request didLoad:(id)result

You catch the result who must be a NSDictionnary.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜