Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 17078

React Native linking.openUrl() not forking for facebook

$
0
0

im getting one facebook-page url from server.But im not able to launch that to facebook app installed in ios by default it opens in safari even i have facebook app installed.

i have tried like this

try {   await Linking.openURL(`fb://profile/${data_facebook_link}`);} catch {   await Linking.openURL(`https://www.facebook.com/${data_facebook_link}`);}

but nothing happen

tried this also

Linking.canOpenURL("fb://profile/XXXXXX").then(supported => {    if (supported) {      return Linking.openURL("fb://profile/XXXXXX");    } else {      return Linking.openURL("https://www.facebook.com/");    }  })

nothing works.But linking.openUrl() works for youtube link its open in youtube app if installed else open in safari.Any one came across this?


Viewing all articles
Browse latest Browse all 17078

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>