我目前正在使用 iOS 的 facebook api 中的 FBFriendPicker 来获取选定朋友的姓名。我怎样才能同时获得朋友的用户ID。下面的函数用于名称。
// Facebook integration
- (void)facebookViewControllerDoneWasPressed:(id)sender {
NSString *text;
// we pick up the users from the selection, and create a string that we use to update the text view
// at the bottom of the display; note that self.selection is a property inherited from our base class
for (id<FBGraphUser> user in self.friendPickerController.selection) {
self.name.text = user.name;
}
[self dismissModalViewControllerAnimated:YES];
}