dynamic link that uses facebook app if installed

396 Views Asked by At

I'm looking for a solution that allows me to create a link on my website to handle the following use cases:

1) On desktop, user is linked to URL - eg. https://www.facebook.com/pg/sony

2) If accessing from Android/IOS and the Facebook app is installed, links to this page in the Facebook App.

3) If accessing from Android/IOS and the Facebook app is not installed, links to standard URL in browser (same as option 1)

Is there a solution for this? I've seen some javascript hacks that don't seem reliable eg. How to check if an app is installed from a web-page on an iPhone?

I've started investigating branch.io and firebase dynamic links as an option, as they provide 'failback' links if your app isn't installed. However, at a glance these seem to be geared towards deeplinking into your own app, rather than a public app like facebook

Is there a reliable solution to this problem?

Many thanks

2

There are 2 best solutions below

1
On

I think your best option is to simply use a plain ol' URL that links to your page on Facebook.

The Facebook app is pretty good at claiming any URLs that it can handle and making sure it redirects people to the right place in the app where necessary. No extra work should be needed on your part.

0
On

Branch will certainly help in deep linking if the app has the Branch SDK installed. Since Facebook does not use Branch, the best option would be to use the original Facebook URL as suggested by Todd.