Im using FBSDKShareKit
(4.22.1), i'm trying to share photo with the following code:
let photo = FBSDKSharePhoto()
photo1.imageURL = URL(string: "sample url")
photo.isUserGenerated = false
let photoContent = FBSDKSharePhotoContent()
photoContent.photos = [photo]
FBSDKShareDialog.show(from: self, with: photoContent, delegate: nil)
but it only works when the native Facebook app is installed on the phone. I also tried to show the content with Share Button instead of Share Dialog like:
var shareButton = FBSDKShareButton()
shareButton.shareContent = photoContent
shareButton.center = self.view.center
self.view.addSubview(shareButton)
it didn't work, if app was not installed either.
i want the FBSDK i used in my app, opens Safari when Facebook app is not installed, it opens safari by default for FBSDKShareLinkContent
, but not working for FBSDKSharePhotoContent
.
does anyone know what is the problem?