8

I have added the following meta info in the head portion of my test web page.

<html>
<head>
  <meta property="al:ios:url" content="schemeregisteredinapp://hereGoesTheURL" />
  <meta property="al:ios:app_store_id" content="12345" />
  <meta property="al:ios:app_name" content="Applinks Supporting App" />
</head>

<body>
<p>Opening a link to this page in Facebook iOS app should launch my "Applinks Supporting App".
</p>
</body>
</html>

I have added the custom url scheme schemeRegisteredInApp in my iOS app's info.plist. If I type a url of the format schemeRegisteredInApp://the/rest/of/the/path in iOS Safari browser, it successful launches my app.

But if I tap on a link to the webpage containing above mentioned HTML in Facebook app or Mailbox app (both are supposed to support applinks protocol) on iOS, the page just opens in a web view inside the Facebook app. My iOS app is never launched. I can't figure out what is going wrong. Applinks simply refuses to work as advertised. This is on iOS 8. Is Applinks broken?

Anil
  • 111
  • 1
  • 5
  • Can you post an example url where you use the above meta-tags with the exact and correct values? – Roemer Oct 21 '14 at 00:16
  • I have a sample page hosted at http://anilgiri.github.io with actual values. – Anil Oct 22 '14 at 10:25
  • @Flaxfield, were you able to test and verify the issue? Could you please provide your inputs on this? We need to take a call on whether to drop this or go ahead. – Anil Nov 03 '14 at 10:37

4 Answers4

14

Add the following to your website meta data and the Facebook iOS app will open your app directly.

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

If that doesn't work then you still have other issues with your meta data. Best way to debug is to go to developers.facebook.com/tools/debug/og/object and type in your url and select 'Show existing scrape information'. If there are any errors it won't work. Fix the problems and hit the 'Fetch new scrape information' button. Then kill the Facebook iOS app and relaunch it. Then the AppLink will work as expected next time you press the item in the FB feed.

cbartel
  • 1,298
  • 1
  • 11
  • 18
0

I tested on iOS 7. Before I updated to the latest Facebook app, I can see a popup at the bottom of the Facebook browser which leads me to my own app. Right after I updated the Facebook app to latest version, the popup doesn't show anymore. Same doesn't work on iOS 8. Maybe a bug in newest Facebook version. Hope to see they fix it or find a workaround.

Shali Liu
  • 1,174
  • 13
  • 23
  • Looks like it got fixed in the latest FB iOS app release. Doesn't work in Mailbox app though as advertised. – Anil Nov 04 '14 at 12:23
  • @Anil Yeah I downloaded the latest one, works great with an alert providing the option to open another app. – Shali Liu Nov 04 '14 at 17:44
0

I just checked the example you provided. For me it correctly shows a popup to install your app, but when installed it doesn't recognise it as being installed.

I inspected your app's plist and it seems that you haven't registered the URLSchema there. That is needed for Applinks to check if the app is installed or not.

Can you test this with a project where you have defined the Appschema in your app's plist?

Roemer
  • 3,566
  • 1
  • 16
  • 32
  • The current version in store does not have AppLinks integration. Hence you didn't find the AppSchema in its plist. I have been testing the integration using dev version installed by Xcode on my device. Do you think it could have something to do with that? – Anil Nov 04 '14 at 12:07
  • Updated to lastest facebook release (Version 16.0) and it indeed shows an applinks button in the navbar and tapping it takes to my app in the appstore app. (Still doesn't work in Mailbox app and FB Messenger app though). – Anil Nov 04 '14 at 12:21
  • Can you again double check that the schema you use for the "al:ios:url" value is the same as in the plist? Also, I'm not sure if "com.something" is supported for the schema. Can you try with only one-world protocols? – Roemer Nov 04 '14 at 13:26
  • Yes @Flaxfield, the value is indeed the same. I have tested, the com.something URL scheme and it works fine. I believe it will be possible to launch the app only when I have a version of the app with the said URL scheme added, in the store. Will update the app in store and get back on this once done. It is strange that there is no method to test this before pushing the changes to a production app in the store. – Anil Nov 06 '14 at 12:12
  • I have been banging my head on this for days. If it simply is that it does not work unless my version of app with schema is in app store, that is REALLY bad. If I put my schema (myappname://) in safari, then my app is lauched. With same schema in iOS.url meta tag, coming from Facebook, my app will not launch automatically. Very frustrating. – mreynol Nov 29 '14 at 18:02
  • You shouldn't need an app that supports the scheme in the store for this to work, as long as you have one on the local device. Can you attach a screenshot of what you're seeing? – Ming Li Dec 08 '14 at 22:45
  • I must say that Applinks behavior has been very inconsistent for us. Now I have a production app on the device with the schema specified in applinks meta tag, registered with the app. When the link to a webpage containing the applinks meta tags is tapped in Facebook app, it opens a web view with three buttons (including an applinks button). Tapping on the applinks icon always prompts me to install the app (pop-up that takes to app store) rather than launching the app. On the same page, I have another link that has exactly the same protocol schema. Tapping that launches my app instantly. – Anil Dec 19 '14 at 13:06
0

If you want that link works in optional way when it launches app or open web page if app is not installed you need to add following meta-tag:

<pre>
<meta property="fb:app_id" content="[facebook app id]" />
</pre>

It does matter whether facebook app id exists or not. It will work properly in iOS only if it is exists. However Facebook on Android will open web view first still but allow to launch app from this page.

Following meta tag must be removed:

<pre>
<meta property="al:web:should_fallback" content="..." />
</pre>
Sergey
  • 21
  • 1
  • 4