facebook / facebook/facebook-ios-sdk
Cannot share to pages
- 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
13.2.1
### Facebook iOS SDK version
12.3.2; 13.0.0; 13.1.0; 13.2.0
### Dependency Manager
SPM
### SDK Framework
Share
### Goals
Share an image to pages
### Expected results
After pressing the share button, I will see some spinner, and the content with the image will be visible on the selected business page.
### Actual results
The Facebook native view is closed immediately without a spinner, `SharingDelegate` doesn't receive any message. The content is not visible on the Facebook Page.
### Steps to reproduce
1. Open native share view (ShareDialog.show() with mode set to native)
2. Select some pages from the top picker
3. Tap the Share button in the top right corner
### Code samples & details
```swift
SDK IOS 15.4
The problem occurs only with pages. When I select Feed, Friend's timeline, or a group - the works fine.
The `FacebookClientToken` is added to the Info.plist
let photo = SharePhoto(image: image, userGenerated: true)
let content = SharePhotoContent()
content.photos = [photo]
let shareDialog = ShareDialog(viewController: viewController, content: content, delegate: delegate)
shareDialog.mode = .native
shareDialog.show()
LOG:
```
Metal API Validation Enabled
[Snapshotting] Snapshotting a view (0x11782f800, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES.
[connection] nw_read_request_report [C9] Receive failed with error "Software caused connection abort"
[connection] nw_read_request_report [C10] Receive failed with error "Software caused connection abort"
[connection] nw_read_request_report [C15] Receive failed with error "Software caused connection abort"
[connection] nw_read_request_report [C19] Receive failed with error "Software caused connection abort"
[connection] nw_read_request_report [C4] Receive failed with error "Software caused connection abort"
[connection] nw_read_request_report [C7] Receive failed with error "Software caused connection abort"
Connection 23: received failure notification
[connection] nw_flow_add_write_request [C23.1 52.49.247.21:443 failed channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] cannot accept write requests
[connection] nw_write_request_report [C23] Send failed with error "Socket is not connected"
Task .<2> HTTP load failed, 31/0 bytes (error code: -1005 [1:53])
Task .<2> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x280804c90 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask .<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask .<2>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://api2.branch.io/v1/open, NSErrorFailingURLKey=https://api2.branch.io/v1/open, _kCFStreamErrorDomainKey=1}
dnssd_clientstub write_all(28) DEFUNCT
dnssd_clientstub deliver_request ERROR: write_all(28, 76 bytes) failed
dnssd_clientstub write_all(28) DEFUNCT
```
```
Contributor guide
Assessment
This issue has not been assessed yet.