I have an app written in Swift3 for iOS9 which attempts to share a custom link with image and description to facebook. The inter-app switching Plist keys are configured correctly - the user is asked for permission to open facebook, then a native facebook post is created in FB app.
The issue is that upon tapping Post, the user is returned to my app, but the FB post does not complete. I see a little black screen with a progress indicator flash, but the user is returned to my app before the progress is filled. (Same progress indicator fills up when using "automatic" share mode within the app)
How to make sure that FBSDKShareDialog completes posting a link to facebook native app before returning to my app?
let content = FBSDKShareLinkContent()
content.contentURL = URL(string: "http://customurl.com/")
content.contentTitle = "Custom Title"
content.contentDescription = "Custom description"
if let imageUrlUnwrapped = imageUrl {
content.imageURL = URL(string: imageUrlUnwrapped)
}
let dialog = FBSDKShareDialog()
dialog.fromViewController = self;
dialog.shareContent = content;
let url = URL(string: "fbauth2://")
if UIApplication.shared.canOpenURL(url!)
{
dialog.mode = FBSDKShareDialogMode.native
}
dialog.show()