0

Hello i am working on sharing and posting images, so i have taken reference from below links:

https://developers.facebook.com/docs/sharing/ios

If FB app installed then it working fine but it is not work when FB not installed. I have did code but not able to open share dialog in my app when FB app not installed in device. can any one suggest or help me where is problems?

I have did code below shared:

below my code-base:

        let photo = SharePhoto(
            image: imageSS,
            userGenerated: true
        )
        let content = SharePhotoContent()
        content.photos = [photo]
        
        let dialog = ShareDialog(
            fromViewController: self,
            content: content,
            delegate: nil
        )

        
        // Recommended to validate before trying to display the dialog
        do {
            try dialog.validate()
        } catch {
            // Handle error
        }
        
        dialog.mode = .automatic
        
        dialog.show()
2
  • Have you added the required values to your info.plist?
    – Paulw11
    Commented Aug 8, 2023 at 19:00
  • @Paulw11 yes i did it.
    – Akash
    Commented Aug 9, 2023 at 3:59

0

Browse other questions tagged or ask your own question.