facebook / facebook/facebook-ios-sdk
share video to messenger fail
- Dominant language
- Swift
- Stars
- 8.1k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 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](https://github.com/facebook/facebook-ios-sdk/issues)
- [x] I've looked for existing answers on [Stack Overflow](https://facebook.stackoverflow.com), the [Facebook Developer Community Forum](https://developers.facebook.com/community/) and the [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers)
- [x] I've read the [Code of Conduct](https://github.com/facebook/facebook-ios-sdk/blob/main/CODE_OF_CONDUCT.md)
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
### Xcode version
Version 16.2 (16C5032a)
### Facebook iOS SDK version
18.0.0
### Dependency Manager
CocoaPods
### SDK Framework
Share
### Goals
share video to Messenger
### Expected results
share videos to Messenger normally
### Actual results
After jumping to Messenger, it automatically returns to the App and the video is not shared in Messenger
### Steps to reproduce
_No response_
### Code samples & details
```swift
private static func shareToMessenger(_ identifier: String,
delegate: SharingDelegate?,
finishBlk: CRSShareResultCallback?) {
guard let asset = PHAsset.fetchAssets(withLocalIdentifiers: [identifier], options: nil).firstObject else {
finishBlk?(false)
return
}
let content = ShareVideoContent()
content.video = .init(videoAsset: asset)
let dialog = MessageDialog(content: content, delegate: delegate)
dialog.shouldFailOnDataError = true
do {
try dialog.validate()
dialog.show()
finishBlk?(true)
} catch {
finishBlk?(false)
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.