通过Facebook,我使用Feed对话框在墙上发布消息。我想获得向其发送Feed的朋友列表。
当用户选择在特定朋友群组上分享讯息的选项时,隐私的值为枚举{EVERYONE
,ALL_FRIENDS
,FRIENDS_OF_FRIENDS
,CUSTOM
,{{1 }}}
我的问题是如何找到上面列表中的Facebook用户ID。
请帮帮我。
提前致谢。
答案 0 :(得分:1)
NSLog(@"%@",[app.Arr_Facebook_Frnd objectAtIndex:indexpath]);
NSString *userid = [[app.Arr_Facebook_Frnd objectAtIndex:indexpath] objectForKey:@"id"];
NSString *str_name = [[app.Arr_Facebook_Frnd objectAtIndex:indexpath] objectForKey:@"name"];
NSString *str_link = @"www.google.com";
NSDictionary *params = @{
@"name" : str_name,
@"caption" : @"",
@"description" : @"",
@"picture" : @"",
@"link" : str_link,
@"to":userid,
};
/
// Invoke the dialog
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
NSLog(@"Error publishing story.");
[self.indicator stopAnimating];
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
NSLog(@"User canceled story publishing.");
[self.indicator stopAnimating];
} else {
NSLog(@"Story published.");
[self.indicator stopAnimating];
}
}}];