App content post on Facebook not opening app upon clicking post

Question

I'm having some issues with Facebook App Links on Android. Problem: clicking a Facebook post that contains a URL to my app's content opens the webpage of the content in Facebook's mobile "browser" instead of deep linking into my Android app.

Web page meta data (values modified for privacy):

<meta property="fb:app_id" content="983094809459723"><meta 
property="og:title" content="Manchester Orchestra"><meta property="og:image" content="https://i.scdn.co/image/aj0293jfalskdfj0293asd"><meta property="og:url" content="https://api.intabc.com/client/redirect/artist/09faslk9-a0d7-3bed-97c5-0923fjlasd9f0"><meta property="al:android:url" content="https://api.intabc.com/client/redirect/artist/09faslk9-a0d7-3bed-97c5-0923fjlasd9f0"><meta property="al:ios:url" content="abc-int://artist?artist_id=09faslk9-a0d7-3bed-97c5-0923faesd9f0"><meta property="al:android:package" content="com.intabc.mobile"><meta property="al:android:app_name" content="ABC - Integration"><meta property="al:ios:app_name" content="ABC - Integration">

Deep link 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="https"
        android:host="api.intabc.com"
        android:pathPrefix="/client/redirect/artist"/>
</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="abc-int"
        android:host="artist"/>
</intent-filter>

Things I've tried:

a) Copy-pasted my content's URL posted to Facebook into a Chrome tab. This correctly redirects to my Android app.

b) Added "og:url", "al:android:url", "al:android:package", and "al:android:app_name" meta properties to all of my content web pages, where "og:url" and "al:android:url" contain the same value tested in a).

Do I need to register my app for Facebook App Links? /shrug

I would greatly appreciate any ideas on what might be the issue.


Show source
| facebook   | android   | deep-linking   | applinks   2017-10-04 22:10 1 Answers

Answers to App content post on Facebook not opening app upon clicking post ( 1 )

  1. 2017-10-06 18:10

    The issue here is that you are using an Android App Link in the meta tag below:

    <meta property="al:android:url" content="https://api.intabc.com/client/redirect/artist/09faslk9-a0d7-3bed-97c5-0923fjlasd9f0">
    

    Facebook only supports URI scheme deep linking from their native app. Hence, if the url uses https or http then the link is going to be handled by the Facebook browser.

    Option 1

    Change your al:android:url to use your Android app's URI scheme, similar to what you did in iOS. This will open your app if installed or fallback to your web URL if al:web:should_fallback is set to true

    Option 2 (Best option)

    Let Branch (I work there) handle your deep linking. It's just easier that way.

Leave a reply to - App content post on Facebook not opening app upon clicking post

◀ Go back