0
I need to create social network buttons inside my app to redirect to the page in question.
Example:
By clicking the facebook icon button I will stop at the page in question through the URL by opening the browser or the facebook app.
0
I need to create social network buttons inside my app to redirect to the page in question.
Example:
By clicking the facebook icon button I will stop at the page in question through the URL by opening the browser or the facebook app.
0
You can use the native method Linking react Native!
Example:
import { Linking, ToastAndroid } from 'react-native'
const openUrl = async(url) => {
if(await Linking.canOpenURL(url)) {
await Linking.openURL(url)
}
else {
ToastAndroid.show('Can\'t open this URL', ToastAndroid.SHORT)
}
}
Now just implement this function within the function onPress
from the button, passing the link you want as argument.
Browser other questions tagged react-native
You are not signed in. Login or sign up in order to post.
Try to get a look at this guy here: https://reactnative.dev/docs/linking
– Gabriel José de Oliveira