我想通过 FBSDKMessenger 与特定用户共享链接和文本。我已经为此完成了所有代码,一切正常,但是当用户打开信使时只有一个问题出现,用户必须手动选择朋友。
有没有办法通过FBID预先选择那个朋友?
这是我的代码
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:[dicShare valueForKey:keyContentURL]];
content.contentTitle = [dicShare valueForKey:keyContentTitle];
content.contentDescription = [dicShare valueForKey:keyContentDescription];
FBSDKMessageDialog *messageDialog = [[FBSDKMessageDialog alloc] init];
messageDialog.delegate = delegate;
if ([messageDialog canShow])
{
[FBSDKMessageDialog showWithContent:content delegate:delegate];
}
else
{
UIAlertView *warningAlert = [[UIAlertView alloc] initWithTitle:localize(@"title_Flare") message:[dicShare valueForKey:keyShareAlertMessage] delegate:nil cancelButtonTitle:localize(@"Ok") otherButtonTitles:nil];
[warningAlert show];
}