title: How exactly Facebook AppLinks work on iOS?
body: <p>I have found one related question: <a href="https://stackoverflow.com/questions/23559208/cannot-get-the-new-applinks-to-work-on-ios-or-android">Cannot get the new AppLinks to work on iOS or Android</a> But I am not sure if it is entirely similar with the problem that I am facing. Thus, I created this question.</p>
  
  <p>If I understand correctly from: <a href="https://developers.facebook.com/docs/applinks/ios" rel="nofollow noreferrer">https://developers.facebook.com/docs/applinks/ios</a></p>
  
  <p><img src="https://i.stack.imgur.com/ivwOx.png" alt="How exactly Facebook AppLinks work on iOS?"></p>
  
  <p>When I click on a proper applink with the proper meta data:-</p>
  
  <p><strong>Case 1:</strong> I have the app installed:</p>
  
  <p><strong>Expected Action 1:</strong> It will navigate to the specific page inside the app.</p>
  
  <p><strong>Case 2:</strong> I do not have the app installed:</p>
  
  <p><strong>Expected Action 2:</strong> It will direct me to the app store page of the app to download.</p>
  
  <p>Here are the configurations that I have done so far:-</p>
  
  <p><strong>The App Link URL:</strong> <a href="http://watchoverme.parseapp.com/" rel="nofollow noreferrer">http://watchoverme.parseapp.com/</a></p>
  
  <p><strong>The App Link Meta Data</strong>:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Watch Over Me&lt;/title&gt;
  &lt;meta property="al:ios:app_store_id" content="431208868"/&gt;
  &lt;meta property="al:ios:app_name" content="Watch Over Me" /&gt;
  &lt;meta property="al:ios:url" content="watchoverme://promotion" /&gt;
  &lt;meta property="al:web:url"
        content="https://itunes.apple.com/app/id431208868?mt=8" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  Yo!
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>On the app side, I have added the custom url scheme like the screen shot below:-
  <img src="https://i.stack.imgur.com/4rofA.png" alt="watchoverme app link url scheme"></p>
  
  <p>So far, I have tested a few scenarios below:-</p>
  
  <p><strong>Scenario 1:</strong> I created another simple app with a single Button to open the applink.</p>
  
  <p>The code for the button:-</p>
  
  <pre><code>- (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];
  }
  </code></pre>
  
  <p><strong>Result 1:</strong> 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?</p>
  
  <p><strong>Scenario 2:</strong> I posted the link (<a href="http://watchoverme.parseapp.com/" rel="nofollow noreferrer">http://watchoverme.parseapp.com/</a>) on Facebook and try to tap on the link on my mobile. </p>
  
  <p><strong>Result 2:</strong> Whether I have the app installed or not, it only shows me the blank website. </p>
  
  <p><strong>The question:</strong> Am I missing something here on the configurations until it can not trigger the expected applink behavior above?</p>
  
  <p>Thanks </p>
  
  <h2><strong>Update #1</strong></h2>
  
  <p>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:-</p>
  
  <p><img src="https://i.stack.imgur.com/ChPf8.png" alt="Facebook App Link"></p>
  
  <p>From the the screen shot above:</p>
  
  <p><strong>Case A</strong>: I share the app link using the Watch Over Me app (you will see "via Watch Over Me")</p>
  
  <p><strong>Result A:</strong> 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!</p>
  
  <p><strong>Case B:</strong> I share the app link using status update only. (without via Watch Over Me)</p>
  
  <p><strong>Result B:</strong> It will only open the blank webpage. </p>
  
  <p>So, the Applink only works when we post the applink via Facebook? And not posting the Applink via our status update?</p>
  
  <h2><strong>Update #2</strong></h2>
  
  <p>I have tested again on 1 September 2014. Both cases above have been working well! A big Thanks Ming Li. </p>