1

In my react web app I have a link to share a website url on Facebook:

<Link href={`https://www.facebook.com/sharer/sharer.php?u=${this.props.shareUrl}`}>

Share on Facebook I could also use a plain html link like so

<a href={`https://www.facebook.com/sharer/sharer.php?u=${this.props.shareUrl}`}>Share on Facebook</a>

When this is clicked Safari is launched and the Facebook web page is displayed.

What would I need to do to get the native Facebook ios or android app to launch (instead of a browser) if it is installed? Could I carry on using this link or would I need to use a share button or install the Fb SDK?

grabury
  • 4,797
  • 14
  • 67
  • 125
  • 1
    Duplicate of https://stackoverflow.com/questions/22275174/facebook-url-schemes-on-a-mobile-website-open-app-if-its-installed-otherwise-g – Bk Santiago Mar 22 '18 at 03:28
  • Possible duplicate of [Facebook URL schemes on a mobile website, open app if its installed, otherwise go to the webpage](https://stackoverflow.com/questions/22275174/facebook-url-schemes-on-a-mobile-website-open-app-if-its-installed-otherwise-g) – mewc Mar 22 '18 at 03:56

1 Answers1

1

Try this one to open a Facebook app from URL. It works for me.

 Linking.openURL("fb://facewebmodal/f?href=https://www.facebook.com/FixadorPT/");
Adeel Iftikhar
  • 772
  • 7
  • 30