I use following code to describe my links:
<meta property="al:android:url" content="fb://page/$id">
<meta property="al:android:package" content="com.facebook.katana">
<meta property="al:android:app_name" content="Facebook">
<meta property="al:web:url" content="https://www.facebook.com/page/$id" />
<meta property="og:title" content="example page title" />
<meta property="og:type" content="website" />
Then, i use a href like fb://page/$id
, and if app is installed - android default browser opens it like a charm. Otherwise i see "Page not found error" - it tries to open fb
protocol anyway.
For ios i see message "Safari is unable to open this page"
How i can fix it?
The app-links information is used as meta data on your page. You can't directly link to App-links information.
The meta tags you have should be within the <head>...</head>
of your page. Now, if an app-links compatible browser opens your page, it will detect the app-links information and can choose to give the option to the visitor to open your app instead.
It also happens to be that the format you refer to, fb://page/$id
works on Android to open the Facebook app directly on your page. This is not the case for iOS. Actually, the functionality on Android isn't even officially supported. There is no official way to link to a Page (or anything, for that matter) directly in the App.
The App-Links structure is meant for you, as a developer, if you want users to be able to quickly open your app when they hit a web resource.