I want to be able to send a link to Facebook Messenger along with a message. On their doc they say I need to assign a value to variable quote
, but no success, the link is present but not the quote...
Here is their doc:
/**
Some quote text of the link.
If specified, the quote text will render with custom styling on top of the link.
@return The quote text of a link
*/
@property (nonatomic, copy, nullable) NSString *quote;
I'm using their library: pod 'FBSDKShareKit', '6.5.2'
on Swift so I import it in my bridging-header.
Here is the chunk of code where im using it:
private func openFacebookMessenger(message: String, urlString: String) {
guard let url = URL(string: urlString) else { return }
let shareLinkContent = ShareLinkContent()
shareLinkContent.contentURL = url
shareLinkContent.quote = message
let dialog = MessageDialog()
dialog.shareContent = shareLinkContent
dialog.shouldFailOnDataError = true
if dialog.canShow {
dialog.show()
}
}
and the result: