8

I have found one related question: Cannot get the new AppLinks to work on iOS or Android But I am not sure if it is entirely similar with the problem that I am facing. Thus, I created this question.

If I understand correctly from: https://developers.facebook.com/docs/applinks/ios

How exactly Facebook AppLinks work on iOS?

When I click on a proper applink with the proper meta data:-

Case 1: I have the app installed:

Expected Action 1: It will navigate to the specific page inside the app.

Case 2: I do not have the app installed:

Expected Action 2: It will direct me to the app store page of the app to download.

Here are the configurations that I have done so far:-

The App Link URL: http://watchoverme.parseapp.com/

The App Link Meta Data:

<html>
<head>
  <title>Watch Over Me</title>
<meta property="al:ios:app_store_id" content="431208868"/>
<meta property="al:ios:app_name" content="Watch Over Me" />
<meta property="al:ios:url" content="watchoverme://promotion" />
<meta property="al:web:url"
      content="https://itunes.apple.com/app/id431208868?mt=8" />
</head>
<body>
Yo!
</body>
</html>

On the app side, I have added the custom url scheme like the screen shot below:- watchoverme app link url scheme

So far, I have tested a few scenarios below:-

Scenario 1: I created another simple app with a single Button to open the applink.

The code for the button:-

- (IBAction)appLinkTapped:(UIButton *)sender {

    NSLog(@"appLinkTapped");

    UIApplication *app = [UIApplication sharedApplication];
    NSString *path = @"watchoverme://promotion";
    NSURL *ourURL = [NSURL URLWithString:path];
    /*
    if(![app
         canOpenURL:ourURL]){
        path = @"http://watchoverme.parseapp.com/";
        ourURL = [NSURL URLWithString:path];
    }*/

    [app openURL:ourURL];
}

Result 1: If I have the WatchOverMe app installed and I tap the button, I can open the WatchOverMe app. Great!. But if the WatchOverMe app is not installed and I tap on the button, nothing happens. Should I be directed to the iTunes App store to download the app? Or I did something wrong?

Scenario 2: I posted the link (http://watchoverme.parseapp.com/) on Facebook and try to tap on the link on my mobile.

Result 2: Whether I have the app installed or not, it only shows me the blank website.

The question: Am I missing something here on the configurations until it can not trigger the expected applink behavior above?

Thanks

Update #1

Thanks Ming Li for pointing me to the right direction. I want to understand better on how app link works. So, I have done more testings and here is what I have found:-

Facebook App Link

From the the screen shot above:

Case A: I share the app link using the Watch Over Me app (you will see "via Watch Over Me")

Result A: When I tap on the link on the Facebook App. If I have the Watch Over Me App installed, it will redirect me to the app. If I do not have the app installed, it will redirect me to the iTunes App store to download. It is working great!

Case B: I share the app link using status update only. (without via Watch Over Me)

Result B: It will only open the blank webpage.

So, the Applink only works when we post the applink via Facebook? And not posting the Applink via our status update?

Update #2

I have tested again on 1 September 2014. Both cases above have been working well! A big Thanks Ming Li.

Ricky
  • 10,485
  • 6
  • 36
  • 49
  • Please don't just downvote the question. If you think that there is anything that I can improve on this question, please share it on the comment here, so that I can learn from my mistake. It will be much helpful this way. Thanks. – Ricky Aug 27 '14 at 01:23
  • So Facebook AppLinks can redirect you to the App Store but once your app is installed, what happens if your custom URL scheme had some parameters? Are they available when you open the app without tapping again on the AppLinks link? – amb Nov 25 '14 at 16:34
  • It doesn't seem to work. I installed your app on my phone, copy and pasted your link on my Messenger, http://watchoverme.parseapp.com/ , tapped your link and it opens the blank page, not the app. It gives me a "Install Watch Over Me" option when I click the "More Action" button, but I already have the app installed.. Help! By the way, how do you specify that your app is "mobile only"? – Van Du Tran Nov 02 '15 at 17:03

2 Answers2

7

For everyone else who doesn't work at Facebook and understand what they mean by "indicating that your app is mobile only" here is what I have found from testing:

It appears they are using the "al:web:should_fallback" meta property as a check for if your app is "mobile only" and has no web presence. This doesn't make sense as far as I can tell based on how the App Links spec defines it but what do I know.

Anyway, if you want your Facebook post to go straight to the deep link in your app and not open up the jarring webview with random app link UX treatments by Facebook then add the following meta property to your html page:

<meta property="al:web:should_fallback" content="false" />

Of course this now prevents you from sending users without the app installed to anything but the app store. However, since the webview is usually just a repeat of the Facebook post in the first place that's probably a worthwhile tradeoff.

jeffjv
  • 3,461
  • 2
  • 21
  • 28
2

Since you have not indicated that your app is mobile only, it would follow the "No" arrow from the original decision box, and show your webpage along with some call to actions for either open or install.

Facebook is always testing different UX treatments, so what you see may not be what other people see. I tried posting a status update with your url, and everything is working as expected.

Ming Li
  • 15,672
  • 3
  • 37
  • 35
  • Thanks for pointing me to the right direction. I want to understand better. I have updated the question with subtitle: "Update #1". Hope that you can clarify my doubt above. Thanks. – Ricky Aug 28 '14 at 07:02
  • What version of the Facebook app do you have? Can you post an image of the webview showing the blank page? What happens if you click on the share button in the bottom right-hand corner? – Ming Li Aug 29 '14 at 17:18
  • The Facebook app version that I am using is 5.0. Surprisingly, I have just tested and both methods above can get to the app (when installed) and also appstore (when not installed). I think this problem has been fixed. Thanks a lot! – Ricky Sep 02 '14 at 01:36
  • Hello, what is meant by "you have not indicated that your app is mobile only"? Where is that indicated? I am facing problems with this as well. I am posting to FB via a dialog share successfully. I post with my URL with a page with the meta tags. The page opens from Facebook, but i am not automatically taken into my app or the app store if it is not installed. I see bits and pieces in other questions/answers but nothing is helping me resolve the issue i'm having. Should I expect the app to open automatically? – mreynol Nov 29 '14 at 18:20
  • @MingLi same problem here also..in my case iam sharing web content using fb share dialogue. So when I tap on shared story it will open ina a webview and sometimes on the top of that page applinking symbol will come..while clicking on the same takes me to the app also..is this proper?? – christijk Dec 08 '14 at 05:53
  • @chriZ123 yes, that is one of the expected behaviors. As I mentioned previously, we're always testing different treatments, and what you're seeing is one of them. – Ming Li Dec 08 '14 at 22:15
  • Okay it's 2016 (going 2017 now) and the links still sometimes show a blank webpage, I don't know why it's supposed to be an expected behaviour but it does. On some devices it works though – Zonily Jame Dec 23 '16 at 17:59