facebook-ios-sdk
facebook-ios-sdk copied to clipboard
Sharing photo and video with ShareMediaContent lost photos (Only video was shared successfully)
Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing GitHub issues
- [X] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [X] I've read the Code of Conduct
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
13.0
Facebook iOS SDK version
v12.2.0
Dependency Manager
CocoaPods
SDK Framework
Share
Goals
Share photo and video to Facebook timeline.
Expected results
Photo and video will appear in my timeline.
Actual results
Only video appears in my timeline.
Steps to reproduce
Using FacebookShareSample, modified ShareViewController to invoke a sharing with ShareMediaContent.
Code samples & details
@IBAction func sharePhoto() {
...
let photo = SharePhoto(image: image, userGenerated: true)
if #available(iOS 14, *) {
let status = PHPhotoLibrary.authorizationStatus(for: .readWrite)
guard status == .authorized else {
PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in
}
return
}
} else {
// Fallback on earlier versions
}
let options = PHFetchOptions()
options.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: true)]
let asset = PHAsset.fetchAssets(with: .video, options: options).firstObject!
let video = ShareVideo(videoAsset: asset)
let content = ShareMediaContent()
content.media = [photo, video]
let dialog = self.dialog(withContent: content)
do {
try dialog.validate()
} catch {
presentAlert(for: error)
}
dialog.show()
}
@joesus I noticed that you removed the needs-triage
label. Thanks for that. Is this bug confirmed? I would happy to know when will it be fixed. 😊
@wgy6055 Can you post a video showing what you're experiencing? It will be helpful to see what the share dialog is showing you before the post is created.
@samodom Thanks for replying. Here is the video. https://github.com/wgy6055/wgy6055/raw/092a383b7bbaa8a35ab407fb3742bed28290eb9c/RPReplay_Final1644999689.MP4
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
This bug has not been fixed.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
@wgy6055 This was fixed in version 376 of the Facebook app.