深层链接到 android 或网络

Deep linking to android or web

我正在尝试向我的网页添加一些 Facebook 元标记,以便可以在 Facebook 上共享它。我还想要以下功能:

所以基本上我希望移动用户在单击共享时使用我的应用程序 link,同时对于网络用户会显示一个网页,他们可以在其中了解该应用程序。

到目前为止我尝试了什么(例如我使用了 imdb):

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta property="og:title" content="Imdb - Android app"/>
    <meta property="og:type" content="game"/>
    <meta property="og:description" content="Download the app to see the content"/>
    <meta property="og:image" content="http://.../pic.jpg" />
    <meta property="og:image:width" content="690" />
    <meta property="og:image:height" content="361" />

    <meta property="al:android:package" content="com.imdb.mobile" />
    <meta property="al:android:url" content="imdb://title/tt0117500" />
    <meta property="al:android:app_name" content="IMDb Movies & TV" />  
    <meta property="al:web:url" content="https://play.google.com/store/apps/details?id=com.imdb.mobile" />  

不幸的是,当移动用户点击上面的标签分享时,只显示网页(如果他们没有应用程序,他们不会被重定向到应用程序商店)。

Facebook 没有很好地支持他们的 App Links 标准。它在 iOS 上根本不起作用,并且在 Android 上不一致。

作为解决方法,您可以在托管这些应用链接标签的页面上将自动 JS 重定向到 Play 商店。这将具有相同的基本效果,并且是我们用于 Branch.io(完全披露:我在 Branch 团队)移动 link 路由平台的方法。