1

I am implementing facebook deeplinking to my android app. The behavior is that when someone shares something on my app it creates a aspx landing page, if someone clicks on the landing page link on an android and has my app installed the deeplinking activity should be fierd and parse the aspx page, then intent to the right place on app. All is working fine if i click the landing page link from anywhere on my phone. The only problem is when i click the link from facebook app.

The strange thing is that there is one item which i can share and it will open up my app, all the rest of the items i share just open up the webview on facebook app.

Here is the meta tags from the apsx landing page:

<meta property="al:android:package" content="com.mypackage"> <meta property="al:android:url" content="com.mydomain://"> Here is manifest :

            <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="http"
                android:host="mypackage.com"
                android:pathPrefix="/Account/" />

            <data android:scheme="https"
                android:host="test.mypackage.com"
                android:pathPrefix="/Welcome.aspx" />

            <data android:scheme="com.mydomain" />
        </intent-filter>

any idea or explenation?

EDIT: I cant find a solution yet but i did find more information, one link opens up the app imidietlly, the rest open up facebook webview and only if i press open with i get my app and can open with it. if i choose to always open with my app then the webview open and when i click on open with it shows myapp.

Any idea why does one link acts good and the rest dosent?

Eliahu Horwitz
  • 499
  • 3
  • 17
  • I have written a detailed solution document under this question: https://stackoverflow.com/questions/46266797/deeplink-solution-for-ios-and-android-apps-works-in-facebook – Mustafa Atalar Sep 17 '17 at 18:29

1 Answers1

0

You should create more intent filters for your data uri pattern.

Here is a note from the android documentation:

Note: Intent filters may only contain a single data element for a URI pattern. Create separate intent filters to capture additional URI patterns.

Found here.

Ray Hunter
  • 15,137
  • 5
  • 53
  • 51
  • Thanks i did that and also i added a meta tag on my web site. . thing is now it works fine but only after the second time the share is clicked, any idea why? also sometimes when i share to FB it only shows url of share and now the thumbnail, title and description. I have "og" tags and when i run it on facebook debugger it says no og:type detected, altough i do have one. when i click "fetch new..." it displays it corectlly. any idea why? – Eliahu Horwitz Jul 15 '15 at 06:58
  • Eliahu, I am not sure what is happening there with FB. I do know that FB has some really poor documentation and that the tools do not work correctly sometimes. If you have the "og" tags, it might be the debugger that has the issue for sure. Do you have the "og:type" set and what type of value do you have? – Ray Hunter Jul 15 '15 at 16:07
  • I have og:type set to content="article", the tag is working fine because sometimes it does show correctly, the problem is sometimes it just wont show :( – Eliahu Horwitz Jul 16 '15 at 12:44