0

我创建了一个新的单视图应用程序,我所做的只是将其自定义 url 方案指定为“deeplink”

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string> (I tried without this too)
        <key>CFBundleURLSchemes</key>
        <array>
            <string>deeplink</string>
        </array>
    </dict>
</array>

我在我的网站上托管了一个 html 文件,其中包含以下内容:

<html>
        <head>
                <meta property="fb:app_id" content="########" /> (I even tried with a Facebook app id and without it)
                <meta property="al:iphone:url" content="deeplink://test" />
                <meta property="og:title" content="Hello Deeplink" />
                <meta property="og:type" content="website" />
                <meta property="og:url" content="http://example.com" />
        </head>
        <body>
                Hello, world!
        </body>
</html>

当我通过 Facebook 应用程序(即帖子)或通过 Facebook Messenger 上的消息单击链接时,它会打开 Facebook 内置浏览器并且不会尝试打开应用程序,它只会显示“Hello, world!” 在浏览器中。我可以通过从 safari 导航到 deeplink://example 打开应用程序。我认为这是应用程序链接所需的所有设置,我错过了什么吗?有没有理由为什么这不起作用?

非常感谢你!

4

0 回答 0