Search code examples
iosfacebookapplinks

App Links not launched by Facebook App on iOS


I am trying to use Facebook's new App Links metadata to cause the Facebook app to launch my native app on iOS. So far, it isn't working.

This is what I've done:

1 . I created a file called test.html with the following code:

<html>
<head>
<meta property="al:ios:url"          content="MyAlScheme://test" />
<meta property="al:ios:app_store_id" content="123456" />
<meta property="al:ios:app_name"     content="My App Name" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
</head>
<body>
<h1>Test</h1>
<a href="MyAlScheme://test">Launch App</a>
</body>
</html>

(* 123456 and My App Name were replaced with the real app name and ID)

2 . In my XCode project, I registered the Scheme MyAlScheme in the app's plist. (Note: Proof that this scheme works is below).

3 . I sent a link to the aforementioned test.html to another user via Facebook Chat.

4 . I clicked on that link and the web page opened, though I am expecting the app to launch instead.

5 . With the web page opened, I clicked on the "Launch App" link. The app opens up (as expected), proving the the custom scheme is properly registered.

What am I missing?


Solution

  • Answering my own question:

    It appears that this is a limitation, specifically, of the iOS Facebook Messenger app. It doesn't support App Links yet.

    The same link, if accessed through the main iOS Facebook app (for example, if you post the link on the wall then click on it from the feed), works correctly: The Facebook app creates a special button on the status bar which allows you to open the link in the native app.