java - Facebook Applink Android - Link shared on facebook some times open in our app using deep linking some times in facebook browser -


i have implemented facebook app linking in android app using below link reference. facebook developer

i have added head tags in our share page. below

 <meta property="al:android:url" content="random content">  <meta property="al:android:package" content="com.packagename">  <meta property="al:android:app_name" content="app">  <meta property="og:title" content="title" />  <meta property="og:type" content="website" />  <meta property="al:web:should_fallback" content="true"> 

and handling incoming intent in app. configured intent filter in manifest. below intent filter defined in manifest.

 <!-- deep linking filter-->         <intent-filter>             <!-- sets intent action view activity -->             <action android:name="android.intent.action.view" />             <!-- allows link opened web browser -->             <category android:name="android.intent.category.browsable" />             <!-- allows deep link used without specifying app name -->             <category android:name="android.intent.category.default"/>             <data                 android:host="@string/deeplink_host"                 android:pathprefix="/share"                 android:scheme="https" />         </intent-filter> 

after work. of url shared on facebook opens in app opens in facebook browser , url sharing on facebook same. ex: https://example.com/share=dynamiccode. dynamic code change rest of url same.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -