Facebook app request opens Google Play instead of the installed app

1.2k Views Asked by At

A while ago(maybe a year back), we have implemented a "send gift" app request feature with Facebook sdk on iOS and Android. We are using v3.19 fb sdk on Android and v3.24 on iOS. The app request has action_type as well as object_id. Things are working fine back then.

recently we noticed that Android deep linking no longer works. When a player receive a gift app request on Facebook app, and click on that notification, it redirect to Google Play Store instead of launching our app.

looking at logcat, looks like Facebook just try to open Google Play Store

02-18 20:11:15.624: I/ActivityManager(587): START u0 {act=android.intent.action.VIEW dat=market://details?id=myapp_id&referrer=utm_source=apps.facebook.com&utm_campaign=fb4a&utm_content=%7B%22app%22%3A469616456758238%2C%22t%22%3A1455123006%7D&fb_source=notification flg=0x10000000 cmp=com.android.vending/com.google.android.finsky.activities.LaunchUrlHandlerActivity (has extras)} from pid 5289

we have enabled deep link in Facebook developer settings and added Key Hash. This problem does not occur on iOS, on iOS clicking on the notification in Fb app will launch our iOS app.

There's a post that is very similar to this one Facebook deep link opens Google Play instead of app (even when installed). The post mentioned we need to add the following to the manifest, does this mean our old version of the app no longer works without the code block? Also we don't have a scheme for our app, where can we define it? and does it mean when we send gift, we need to use that scheme?

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="myapp"/>
</intent-filter>
1

There are 1 best solutions below

0
On

There's an old page in the facebook docs that says

Class Name: This is the class name of the main activity you want Facebook to launch. Include the namespace of your app (ex: com.domain.appname.MainActivity). This field is also used to generate the Google Play Store URL.

Took me a while to figure this out but apparently the Class Name field should contain the full class name. (com.domain.appname.MainActivity)