You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
15.1
Facebook iOS SDK version
17.0.0
Dependency Manager
CocoaPods
SDK Framework
Share
Goals
Share photo to Facebook is also can be success in development environment.
Expected results
share photo to facebook and can find it in facebook
Actual results
After I clicked Share to Facebook, it jumped to the Facebook post page and previewed the sent content and image, but after clicking the post button, it came back to my app and didn't receive any SharingDelegate callback(didCompleteWithResults, didFailWithError or sharerDidCancel)
And then I went to my Facebook profile to look for it, I didn't find the content I just posted.
I confirmed that if I click on cancel posting I will get the sharerDidCancel callback.
Anything else, if I share content that is not an image but a URL, it is successful and will have the didCompleteWithResults callback.
Steps to reproduce
It's happen in a development environment every time, but if it's downloaded from the appstore, there is no problem
Code samples & details
extensionShareFacebookService{privatefunc sharePhotoContent(_ viewModel:SocialShareFacebookViewModel){
guard let vc =UIApplication.shared.itKeyWindow?.visibleViewController else{self.completionHandlerBlock?(false,"viewController nil")return}
if let images = viewModel.images, images.count >0{letphotoContent=SharePhotoContent.init()varphotos:[SharePhoto]=[]
for image in images {letphoto=SharePhoto.init(image: image, isUserGenerated: true)
photos.append(photo)}
photoContent.photos = photos
if let tag = viewModel.hashtag {
photoContent.hashtag =Hashtag.init("#\(tag)")}
if let contentURL = viewModel.contentUrl,let url =URL.init(string: contentURL){
photoContent.contentURL = url
}letdialog=ShareDialog(viewController: vc, content: photoContent, delegate:self)
dialog.mode =SocialShareFacebookService.isInstalled()?.native : .automatic
dialog.show()}else{self.completionHandlerBlock?(false,"image count is 0")}}privatefunc shareLinkContent(_ viewModel:SocialShareFacebookViewModel){
guard let vc =UIApplication.shared.itKeyWindow?.visibleViewController else{self.completionHandlerBlock?(false,"viewController nil")return}letlinkContent=ShareLinkContent.init()
if let tag = viewModel.hashtag {
linkContent.hashtag =Hashtag.init("#\(tag)")}
if let contentURL = viewModel.contentUrl,let url =URL.init(string: contentURL){
linkContent.contentURL = url
}
if let quote = viewModel.quote {
linkContent.quote = quote
}letdialog=ShareDialog(viewController: vc, content: linkContent, delegate:self)
dialog.mode =SocialShareFacebookService.isInstalled()?.native : .automatic
dialog.show()}}extensionShareFacebookService:SharingDelegate{func sharer(_ sharer:Sharing, didCompleteWithResults results:[String:Any]){completionHandlerBlock?(true,nil)}func sharer(_ sharer:Sharing, didFailWithError error:Error){completionHandlerBlock?(false, error.localizedDescription)}func sharerDidCancel(_ sharer:Sharing){completionHandlerBlock?(false,nil)}}
The text was updated successfully, but these errors were encountered:
Checklist before submitting a bug report
Xcode version
15.1
Facebook iOS SDK version
17.0.0
Dependency Manager
CocoaPods
SDK Framework
Share
Goals
Share photo to Facebook is also can be success in development environment.
Expected results
share photo to facebook and can find it in facebook
Actual results
After I clicked Share to Facebook, it jumped to the Facebook post page and previewed the sent content and image, but after clicking the post button, it came back to my app and didn't receive any SharingDelegate callback(didCompleteWithResults, didFailWithError or sharerDidCancel)
And then I went to my Facebook profile to look for it, I didn't find the content I just posted.
I confirmed that if I click on cancel posting I will get the sharerDidCancel callback.
Anything else, if I share content that is not an image but a URL, it is successful and will have the didCompleteWithResults callback.
Steps to reproduce
It's happen in a development environment every time, but if it's downloaded from the appstore, there is no problem
Code samples & details
The text was updated successfully, but these errors were encountered: