您可以使用friendList
将respective
和name and id
FBGraph API
一起获得,如下所示:
FbGraphResponse *fb_graph_response = [fbgraph doGraphGet:@"/me/friends" withGetVars:nil];
但是如何使用
name, id and picture
获取all friends
的FBGraph API
? 最佳答案
您可以使用friendList
将name, id and picture
与相应的FBGraph API
一起获得,如下所示:
NSDictionary *param=[NSDictionary dictionaryWithObjectsAndKeys:@"picture,name",@"fields", nil];
FbGraphResponse *fb_graph_response = [fbgraph doGraphGet:@"/me/friends" withGetVars:param];
Response
将是data = {
id = 100001625299089;
name = "Name here";
picture = {
data = {
s_silhouette" = 0;
url = "url here";
};
};
},
//all other friends here
}
编辑:您可以
loaction
,birthday
和FBGraph API Documentation中列出的许多other fields
。只需在上面的代码中更改
param dictionary
NSDictionary *param=[NSDictionary dictionaryWithObjectsAndKeys:@"picture,name,location,birthday",@"fields", nil];
关于iphone - iOS:使用FBGraph API获取FriendList以及相应的名称,ID和图片,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14257549/