我正在使用facebook API,下一行导致我出现问题:
[facebook requestWithGraphPath:(@"%@/friends",[tmpFriendID objectAtIndex:i]) andDelegate:self];
我需要访问某些联系人的朋友,所以我传递了联系人/朋友的-ID,但不知何故,它只发送了ID,因此我不会得到朋友,而是联系人资料。
我做错了什么?
答案 0 :(得分:0)
删除关闭的paranthesis
更改此
[facebook requestWithGraphPath:@"%@/friends",[tmpFriendID objectAtIndex:i]) andDelegate:self];
到
[facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/friends",[tmpFriendID objectAtIndex:i]] andDelegate:self];
OR
[facebook requestWithGraphPath:[NSString stringWithFormat:@"%i/friends",[tmpFriendID objectAtIndex:i]] andDelegate:self];
此外,请参阅我的回答获取好友列表