在Facebook SendMessage对话框中指定接收器

时间:2014-06-02 07:07:43

标签: ios objective-c facebook facebook-graph-api

我正在尝试允许我的iOS应用的用户与他们在之前屏幕上选择的朋友分享链接和消息私下

发送链接可以使用Facebook's SendMessge Dialog完成。但是,我找不到指定接收器的方法。是否可以以编程方式设置此对话框的“到”字段?

[FBDialogs presentMessageDialogWithLink:[NSURL URLWithString:@"https://developers.facebook.com/docs/ios/"] 
                                handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
                                  if(error) {
                                    // An error occurred, we need to handle the error
                                    // See: https://developers.facebook.com/docs/ios/errors
                                    NSLog([NSString stringWithFormat:@"Error messaging link: %@", error.description]);
                                  } else {
                                    // Success
                                    NSLog(@"result %@", results);
                                  }
                                }];

可能的解决方案

One possible solution would be to do away with the sdk altogether and use a custom url to bring up the Facebook messenger.

0 个答案:

没有答案