0

I have been trying to work out how to directly share videos to social media through my React Native (Expo) app, but I can't figure it out. I don't want to use "[share]" (https://www.stackoverflow.com/) from React Native, as that goes through a bottom modal first and then allows the user to choose the platform.

For example, I want to be able to click on a "share on Instagram" button and get directly directed to the Instagram app through my React Native app. I have tried the "expo-facebook" login as an example, but that doesn't work anymore with my Expo SDK version.

Please, does anyone have any suggestions or ideas for what I can do? I want to use it to share videos on YouTube, posts on Instagram, tweets on Twitter, and posts on Facebook.

Thank you in advance!

I have tried using "react-native-share" ([link] (https://react-native-share.github.io/react-native-share/docs/install)), but I can't link the native modules as I'm using Expo (I believe this is at least why). I ran "npm install react-native-share" and then tried to run "react-native link react-native-share" or "expo link react-native-share," but this didn't work.

I also tried using "expo-facebook," but the module has been deprecated ([link]: https://docs.expo.dev/versions/v45.0.0/sdk/facebook/).

AstroInTheOcean
  • 383
  • 1
  • 3
  • 18
  • Have you seen solutions like [this](https://snack.expo.dev/@takahi5/twitter-share?) before? It might be doable just with Linking and deeplinks. – Abe Feb 13 '23 at 04:10
  • Hey Abe, thanks for your comment! I had a look and it would be great for sharing text but I'm trying to share videos and images so I don't think that works with Linking (unless I missed something). – lisadev123 Feb 13 '23 at 04:31
  • No, you're right - I thought you could send some stuff as params, but can't find anybody doing that. react-native-share however should work for you, if you're able to add it to the project. I haven't done much with Expo so not much help there – Abe Feb 13 '23 at 04:39
  • All good, thanks for trying anyway:). The last resort might be to eject from Expo but I've still got hope that there's another 'easy' solution out there. – lisadev123 Feb 13 '23 at 04:55

0 Answers0