facebook-ios-sdk icon indicating copy to clipboard operation
facebook-ios-sdk copied to clipboard

Sharing photo and video with ShareMediaContent lost photos (Only video was shared successfully)

Open wgy6055 opened this issue 2 years ago • 5 comments

Checklist before submitting a bug report

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()
}

wgy6055 avatar Dec 14 '21 10:12 wgy6055

@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 avatar Dec 27 '21 06:12 wgy6055

@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 avatar Feb 15 '22 18:02 samodom

@samodom Thanks for replying. Here is the video. https://github.com/wgy6055/wgy6055/raw/092a383b7bbaa8a35ab407fb3742bed28290eb9c/RPReplay_Final1644999689.MP4

wgy6055 avatar Feb 16 '22 08:02 wgy6055

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.

github-actions[bot] avatar May 18 '22 05:05 github-actions[bot]

This bug has not been fixed.

wgy6055 avatar May 19 '22 05:05 wgy6055

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.

github-actions[bot] avatar Aug 18 '22 05:08 github-actions[bot]

@wgy6055 This was fixed in version 376 of the Facebook app.

samodom avatar Aug 18 '22 16:08 samodom