1

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>
Community
  • 1
  • 1
moson
  • 11
  • 3
  • Also the similar post is actually having issue with ad deep linking. in my case it's app request deep linking not working. – moson Feb 19 '16 at 09:34
  • Did you check this https://developers.facebook.com/docs/applinks/android ? – user1744952 Feb 19 '16 at 09:37
  • yea. basically it's telling us to add the intent and intent filter in the manifest. In the example it uses which correspond to sharesample://xxxx. However, we don't even know where to define such scheme – moson Feb 19 '16 at 09:50
  • 1
    It will look something like : – user1744952 Feb 19 '16 at 10:24
  • that part i understand, but what is "sharesample" in my case. that's my question. we don't specify any sharesample when we send a fb app request – moson Feb 19 '16 at 10:38
  • where do we define "sharesample" in my Facebook developer setting page correspond to my "send gift" app request? – moson Feb 19 '16 at 10:39
  • it is the starting scheme of the url - sharesample://xxxxxxx.com. Check https://developers.facebook.com/docs/applinks/add-to-content – user1744952 Feb 19 '16 at 11:06
  • i have read that page too. i understand how deep linking will work on a shared content/URL. however, when sending an app request in Facebook sdk, we do not specify any URL or web content. basically we use the graph api endpoint like this https://m.facebook.com/v2.1/dialog/apprequests?access_token=_accesstoken&object_id=479262772224068&app_id=_app_id&to=_fb_userid. and the app request will show up on the notification panel inside the player's Facebook app. we couldn't find any information on how to add app link information to such an app request – moson Feb 19 '16 at 11:17

1 Answers1

0

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)

Jespertheend
  • 1,814
  • 19
  • 27