Navya Singh
Navya Singh

Reputation: 1

Shorten url and share in react native

I want to share a url like an anchor tag ( for example it should display click here and on clicking it should take us to a url) across apps(whatsapp, fb, insta etc)in react native. Currently I am using react-native-share library. Is there any way to achieve it.

Upvotes: 0

Views: 1094

Answers (1)

rowinbot
rowinbot

Reputation: 632

react-native provides a way for your app to open url's (which may trigger the opening of an app via deep-links like: whatsapp://url):

Linking.openURL(url).catch(err => console.error('An error occurred', err));

Check source.

Upvotes: 1

Related Questions