react-native-share / react-native-share

Social share, sending simple data to other apps.

Home Page:https://react-native-share.github.io/react-native-share

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Messenger Share on iOS not working for me

joeljerushan opened this issue · comments

Hi, im using following Versions of React Native and React Native Share

"react-native": "0.70.6",
"react-native-share": "^10.0.2",

As in documentation im trying to share my Firebase generated Dynamic URL to messenger like following code, but when i tap its not opening messenger app,

const shareOptions = {
      message: 'Check this out!',
      url: 'MY_SHARABLE_LINK',
      social: Share.Social.MESSENGER,
      appId: 'MY_APP_ID',
    };

    try {
      const ShareResponse = await Share.shareSingle(shareOptions);
      console.log(ShareResponse);
    } catch (error) {
      console.log('Error =>', error);
    }

if i try Share.open it opens native Share popup instead of messenger.

await Share.shareSingle(shareOptions)
      .then((res) => {
        console.log(res);
      })
      .catch((err) => {
        err && console.log(err);
      });

but when i try Linking.openURL(fb-messenger://share?link=${link}); this single line of code it works perfectly. my question is does this plugin don't have such feature and should we using Linking library instead or any correct way to do with react-native-share library ?