I followed the procedure for sending the link + content to facebook messenger through my MessageDialog API. I managed to get the contents of the link in the message dialog, but the submit button is disabled. I think this is more of a configuration problem than anything else.
I implemented this on xamarin native ios with the latest version of xamarin facebook sdk (v 4.15.1) and I am compiling with sdk 10.0.
Here is a very simple implementation:
public bool SendMessageViaMessenger(string Text, string Link) {
var content = new ShareLinkContent();
content.SetContentUrl(new NSUrl(Link));
content.ContentTitle = "Here is an invite";
content.ContentDescription = "Test description";
MessageDialog.Show(content, null);
return true;
}
Here is my Infobook.info configuration section:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{my-fb-app-id}</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>{my-fb-app-id}</string>
<key>FacebookDisplayName</key>
<string>{my-fb-app-name}</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
where {my-fb-app-id} has been replaced by my facebook app id and {my-fb-app-name} with the app name.
I also have:
Checked that my package ID is the same as the one I entered in the facebook application configuration;
, facebook;
, -;
, facebook, :
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
Facebook.CoreKit.ApplicationDelegate.SharedInstance.FinishedLaunching(app, options);
return base.FinishedLaunching(app, options);
}
.
!