Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Deep Linking not working on Android

I am trying to implement Facebook deep linking feature according to https://developers.facebook.com/docs/app-ads/deep-linking.

I have followed step by step instructions:

  • Created FB app
  • Added FB sdk (4.13.2) to Android app

When I run the app, it is detected by Facebook, verified on the https://developers.facebook.com/tools/app-ads-helper/

enter image description here I also created an Activity to handle deep links. AndroidManifest configuration:

    <activity android:name=".DeeplinkActivity">
        <intent-filter>
            <data
                android:host="deeplink.com"
                android:pathPrefix="/openapp"
                android:scheme="deep" />
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>

DeeplinkActivity opens if started from adb via:

adb shell am start -W -a android.intent.action.VIEW -d "deep://deeplink.com/openapp" com.example.rps

This is Android configuration under Facebook app settings: enter image description here

Please note that fully qualified Class Name (com.example.rps.DeeplinkActivity) is also not working.

I tried testing deep links via Deeplink Tester, on the App Ads Helper page (link above)

enter image description here

I receive notification on my phone from Facebook app, saying "Tap to launch your deep link", but nothing happens, my app is never started.

What am I missing?

like image 702
D.D. Avatar asked Jul 12 '16 08:07

D.D.


People also ask

How do deep links work Android?

A Deep Link is a URL link that is generated, when anyone clicks on that link our app will be open with a specific activity or a screen. Using this URL we can send a message to our app with parameters. In WhatsApp, we can generate a deep link to send a message to a phone number with some message in it.


1 Answers

When you receive notification on your phone from Facebook app, saying "Tap to launch your deep link" you have to open Facebook app on the "notifications" tab and click on the received notification THERE, that will start your app (if it's installed, that is).

If you just click on the notification in the action bar nothing will happen. Confusing I know, since it blatantly states "Tap to launch your deep link".

like image 128
Дмитрий Кириллов Avatar answered Sep 30 '22 13:09

Дмитрий Кириллов