I want to share link and text with particular user via FBSDKMessenger. I have done all the code for this and everything is working fine but only one problem is coming when user open messenger, user has to select friend manually.
Is there any way to preselect that friend by it's FBID?
Here is my code
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];
}
No, this is not supported. You can prepare the content (just like you did) and then use the
FBSDKMessageDialog
to link the user to Messenger where they select the friends they want to send the message to.