facebook / facebook/facebook-ios-sdk
Facebook ShareDialog not working when FacebookApp not installed.
- 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
Xcode 13.4
### Facebook iOS SDK version
13.2.0
### Dependency Manager
CocoaPods
### SDK Framework
Share
### Goals
When Facebook app not installed, Go to Safari or default webbrowser and show Share page.
### Expected results
Open Safari or default webbrowser.
### Actual results
Nothing working, even i got success didComplete delegate event.
.
### Steps to reproduce
Facebook app was not installed.
And, i used mode values what
.automatic, .browser, .feedbrowser.
### Code samples & details
```swift
// INSERT YOUR CODE HERE
var example = "Example code"
guard let fbSDKDelegatableVC = Navigator.topMostViewController as? (UIViewController & SharingDelegate) else { return }
let fbTitleMaxLength = 20
var quote = AppTarget.current == .korea ? L10n.Sharetofacebook.Quote.Contents.kr : L10n.Sharetofacebook.Quote.contents
let limited = quote.limiting(fbTitleMaxLength)
if limited != quote {
quote = "\(limited)..."
}
let content = ShareLinkContent()
content.quote = quote
content.contentURL = appURL
let dialog = ShareDialog(viewController: fbSDKDelegatableVC, content: content, delegate: fbSDKDelegatableVC)
// if let url = URL(string: "fbauth2://"), UIApplication.shared.canOpenURL(url) {
// dialog.mode = .automatic
// } else {
// dialog.mode = .browser
// }
dialog.mode = .feedBrowser
if dialog.canShow {
print("it's can show")
}
dialog.show()
```
Contributor guide
Assessment
This issue has not been assessed yet.