Dan*_*e B 6 android facebook facebook-graph-api facebook-opengraph applinks
我在HTML中包含了正确的应用程序链接元标记,因此通过点击Facebook上的链接,Android和iOS应用程序将以正确的内容打开.
这是页面的示例:https: //trenit.info/L2o
<meta property="al:ios:url" content="https://trenit.info/L2o" />
<meta property="al:ios:app_store_id" content="1058908183" />
<meta property="al:ios:app_name" content="Trenit!" />
<meta property="al:android:url" content="https://trenit.info/L2o" />
<meta property="al:android:app_name" content="Trenit!" />
<meta property="al:android:package" content="eu.baroncelli.oraritrenitalia" />
Run Code Online (Sandbox Code Playgroud)
我在Facebook上发布了这个链接,我已经安装了Trenìt!我的Android和iOS设备中的应用程序.
在iOS上:
如果我使用Facebook应用程序并点击该链接,那么Trenìt!iOS应用程序正确打开该内容.
在Android上:
如果我使用Facebook应用程序并单击该链接,则会打开HTML页面而不是Trenìt!Android应用.
难道我做错了什么?
请注意,在Android清单上我已经指定了这个意图过滤器:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="trenit.info" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
在android中,要从外部链接/短信打开您的应用程序..,您必须在应用程序中使用深层链接。这样您的应用程序将显示在选择启动器对话框中,您可以在其中选择要打开的应用程序
\n请按照下面的开发人员链接
\n https://developer.android.com/training/app-indexing/deep-linking.html
\n下面的 xml 只是为了理解。请相应更改\n
\n\n<activity\n android:name="--YourActivityName--"\n android:label="--your app lable--" >\n <intent-filter android:label="@string/filter_title">\n <action android:name="android.intent.action.VIEW" />\n <category android:name="android.intent.category.DEFAULT" />\n <category android:name="android.intent.category.BROWSABLE" />\n <!-- Accepts URIs that begin with "https://trenit.info/L2o\xe2\x80\x9d -->\n <data android:scheme="https"\n android:host="trenit.info"\n android:pathPrefix="/L2o" />\n </intent-filter>\n</activity>\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
1095 次 |
最近记录: |