react-native-share: Facebook iOS not working
Steps to reproduce
- Use
shareSingle
This is what I am doing:
const shareOptions = {
url: picture.uri, // <<<< dynamic
social: social === 'instagram' ? Share.Social.INSTAGRAM : Share.Social.FACEBOOK,
};
Share.shareSingle(shareOptions)
.then((res) => { console.log(res); })
.catch((err) => { err && console.log(err); });
Expected behaviour
Open the Facebook app to share the image.
Actual behaviour
Safari will open and I have the following image: href should represent a valid URL.
The console.log of the promise tells me that the application is not installed (instead it is installed).

Environment
- React Native version: 0.57.1
- React Native platform + platform version: iOS 12
react-native-share
Version: master (1.1.2)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 19 (4 by maintainers)
Commits related to this issue
- Update Info.plist This PR aims to clarify the issues faced when trying to implement singleShare for facebook. More specifically, specifying `facebook` in the `Info.plist` does not necessitate the abi... — committed to asalem1/react-native-share by asalem1 4 years ago
- docs: Update Info.plist (#851) This PR aims to clarify the issues faced when trying to implement singleShare for facebook. More specifically, specifying `facebook` in the `Info.plist` does not necess... — committed to react-native-share/react-native-share by asalem1 4 years ago
- docs: Update Info.plist (#851) This PR aims to clarify the issues faced when trying to implement singleShare for facebook. More specifically, specifying `facebook` in the `Info.plist` does not necess... — committed to mobiledev7/react-native-share by mobiledev7 4 years ago
Experiencing the same issue. Instagram is working fine but facebook just opens up
facebook.comon Safari with the following errorhref should represent a valid URL.Here’s the code:
and I do have facebook in
LSApplicationQueriesSchemes:EDIT: Ok actually the issue is only with the doc 🙂, the query scheme for facebook is not
facebookbutfb, so just addfbto yourLSApplicationQueriesSchemesarray and it’s going to work just fine!You can use
Linking.canOpenURL('fb://')to detect if it’s installed or notunder share button function you can use facebook share function very easy and its work on IOS facebook link: https://developers.facebook.com/docs/react-native/sharing/ sample: <Button iconSrc={{ uri: FACEBOOK_ICON }} onPress={()=>{ ShareDialog.canShow(shareLinkContent).then( function(canShow) { if (canShow) { return ShareDialog.show(shareLinkContent); } } ) }}>Facebook</Button>
@jgcmarins With the latest version of Instagram v68 release today (22 oct) seems working again on iOS. Facebook still not working