We have implemented Firebase Dynamic Links in accordance with this documentation https://firebase.google.com/docs/dynamic-links/ , and they work correctly in all cases except the Facebook and Facebook Messenger application.
First, we create a dynamic link to our application:
Builder builder = new Builder() .scheme("https") .authority("winged-guild-133523.appspot.com") .appendPath("share") .appendQueryParameter("query", query);
Then we create a long dynamic link:
Builder builder = new Builder() .scheme("https") .authority("zkkf4.app.goo.gl") .appendPath("") .appendQueryParameter("link", deepLink) .appendQueryParameter("apn", "com.mydomain.myapp");
Then we exchange a long dynamic link with a short link to https://firebasedynamiclinks.googleapis.com/v1/shortLinks and share it using the intent:
Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, text); startActivity(Intent.createChooser(intent, null));
If we share this link using the Facebook application:
- The short link is correctly divided.
- If the application is not installed, clicking on the link in the Facebook application goes correctly on Google Play and after installing the application, the deep link is processed correctly.
- If the application is installed, clicking on the link in the Facebook application also applies to Google Play, and after clicking the "Open" button, the deep link does not transfer to the application, because Google Play does not transfer referrer information to the application if the installation was not completed.
If we share this link using the Facebook Messenger app:
So, I see three problems:
- The Facebook application does not correctly detect that the application is installed.
- The Facebook Messenger app uses a long dynamic link instead of a short one.
- The Facebook Messenger application may detect that the application is installed, but goes to the link instead of Google Play if the application is not installed.
Does anyone have an idea of what is happening with how to solve these problems?
PS: Although it doesn’t matter because deep link processing in the application works correctly, this is our intent filter shown:
<intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter android:label="@string/app_name"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="http"/> <data android:scheme="https"/> <data android:host="winged-guild-133523.appspot.com"/> <data android:host="www.winged-guild-133523.appspot.com"/> <data android:pathPattern="/share.*"/> </intent-filter>