facebook api requestWithGraph doesnt work
i am work开发者_如何学Going with facebook API and next line is causing me problems:
[facebook requestWithGraphPath:(@"%@/friends",[tmpFriendID objectAtIndex:i]) andDelegate:self];
i need to access friends of certain contact so im passing in -ID of contact-/friends, but somehow it sends in just the ID and so in resoult im not getting friends, but contact profiles.
what am i doing wrong?
remove close paranthesis
change this
[facebook requestWithGraphPath:@"%@/friends",[tmpFriendID objectAtIndex:i]) andDelegate:self];
to
[facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/friends",[tmpFriendID objectAtIndex:i]] andDelegate:self];
OR
[facebook requestWithGraphPath:[NSString stringWithFormat:@"%i/friends",[tmpFriendID objectAtIndex:i]] andDelegate:self];
Moreover see my answer for get friendlist
Retrieve Facebook friends list
精彩评论