Dynamic links in Facebook mobile app is not deep linked to app

12,996

Solution 1

To avoid this cases we made a webpage which redirects to firebase dynamic link. With this solution we can:

  1. Use our domain, not the firebase url.
  2. Ensure that firebase links works in every cases, for example when it opens from a custom browser (fb, samsung).

The disadvantage of doing this is that you'll always need to pass through a web page with an redirect.

Solution 2

We were struggling with the similar issue and here's how we finally solved it:

Say this is the final firebase url you are going to share

https://xxxx.app.goo.gl/?apn=com.your.package&link=http://www.yourwebsite.com

Now in the index.html page of your website, add the following meta tags

<meta property="fb:app_id" content="your_fb_app_id" />
<meta property="al:android:package" content="com.your.package" />
<meta property="al:android:app_name" content="YourAwesomeApp" />
<meta property="al:android:url" content="somescheme://XYZ" />   <!-- identifiable by your app, your app must handle this data scheme inside your manifest's intent-filter tag --!>
<meta property="al:web:should_fallback" content="true" />
<meta property="al:web:url" content="http://www.yourwebsite.com/" />

Now the app launches on clicking on the facebook post shared using this link.

Solution 3

I recently had to integrate dynamic links to one of my clients apps, and I got lots of trouble because of deeplinks not working on facebook+android_app.

As I couldn't move to branch.io because of princing reasons, I had to work it out on a different way so followed @Rahul Shukla advise.

I ended with a very simple nodejs+express setup where I receive the dynamic link ID and return a HTML with all the meta-tags required by facebook applinks (android + iOS) and a redirect script (window.location = 'your_dynamic_link') for other clients to be used.

The best part is that now on facebook the app opens directly without the preview page in both platforms and the link works on all browsers via the script redirect.

Here is the gist

Solution 4

the solution I found was to redirect to the dynamic link from a webpage like this

window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";

this will open the link in your system default external browser and the deeplinks works perfectly.
to trigger this only on facebook in-app browser

if (ua.indexOf("FBAN") != -1 || ua.indexOf("FBAV") != -1) {window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";}

Solution 5

I've tried some ways but totally fail. When I use the dynamic link in Facebook post, it shows a dialog to ask me if I wanna open application (I did not install my application yet). Although I accept to open app, nothing happens, it does not open Apple Store as expected

I have to use link like below to force it open apple store app https://myapp.app.goo.gl/?link=http://mylink.com&ifl=https://itunes.apple.com/us/app/apple-store/idxxxxxxxx%3Fmt%3D8%26ct%3Dutm_source

Share:
12,996
RobLabs
Author by

RobLabs

Creating Innovations in Maps for Mobile, Print &amp; Web.

Updated on June 15, 2022

Comments

  • RobLabs
    RobLabs about 2 years

    Problem — when opening a Firebase Dynamic Link on Facebook Mobile, the Facebook Browser consumes the deep link and does not open the intended mobile app

    Question — is there a good workaround in Firebase to help Facebook deliver on the promise of presenting my Dynamic Link as intended?

    We are aware of http://applinks.org, and that Facebook is a contributor. Does Firebase have a way to configure their server using the AppLinks spec so that Facebook will pass through the Deep Link to our app instead of consuming it?

    Background — I have created a Firebase Dynamic Link for an iOS and Android app.

    The Dynamic link delivers everything I expect and is a fantastic experience.

    1. When opened on iOS, it navigates to the App. If not installed, it goes App Store
    2. When opened on Android, it navigates to the App. If not installed, goes to Play Store
    3. When opened on non-mobile, it navigates to our Website
    4. On Facebook mobile, neither 1 nor 2 happens. The result is that it goes straight to the mobile web experience, thereby eliminating the promise of the Firebase Dynamic Link