我想为我的应用创建促销链接 - 我可以通过电子邮件分发.当用户点击电子邮件中的链接时,网页会执行以下操作:
我尝试使用AppLinks(applinks.org) - 但我无法让它工作.浏览器如何理解"al:xx:xxx .."标签?它只适用于facebook/twitter吗?
<html>
<head>
<meta property="al:ios:url" content="applinks://docs" />
<meta property="al:ios:app_store_id" content="12345" />
<meta property="al:ios:app_name" content="App Links" />
<meta property="al:android:url" content="applinks://docs" />
<meta property="al:android:app_name" content="App Links" />
<meta property="al:android:package" content="org.applinks" />
<meta property="al:web:url" content="http://applinks.org/documentation" />
</head>
Run Code Online (Sandbox Code Playgroud)
我还尝试了另一篇文章中的一些javascript - 但如果未安装该应用程序,浏览器会显示错误:
<script>
window.onload = function() {
window.location = 'http://www.launchMyApp';
setTimeout("window.location = 'http://play.google.com/someApp';", 1000);
}
</script>
Run Code Online (Sandbox Code Playgroud)
请帮忙.谢谢.