简体   繁体   English

Facebook Messenger 打开内置浏览器而不是深度链接应用

[英]Facebook Messenger opens built-in browser instead of deep linked app

I have a Cordova app that uses the plugin cordova-universal-links-plugin .我有一个 Cordova 应用程序,它使用插件cordova-universal-links-plugin The deep linking works on other social applications but not with Facebook Messenger.深层链接适用于其他社交应用程序,但不适用于 Facebook Messenger。 Instead, it opens the built-in browser and redirects it to the link.相反,它会打开内置浏览器并将其重定向到链接。

Here's my config.xml这是我的config.xml

<universal-links>
    <host name="myapp.com">
        <path event="openItemPage" url="/item" />
    </host>
</universal-links>

And in my Cordova app:在我的 Cordova 应用程序中:

document.addEventListener('deviceready', onDeviceReady, false);

function onDeviceReady () {
    universalLinks.subscribe('openItemPage', (eventData) => {
        // more code here
    });
}

Ran into a similar issue myself, and unfortunately, it looks like FB uses their own different scheme for linking called FB App Links.我自己遇到了类似的问题,不幸的是,看起来 FB 使用他们自己不同的链接方案,称为 FB App Links。

The webpage for app links: https://developers.facebook.com/docs/applinks/应用链接网页: https : //developers.facebook.com/docs/applinks/

A blogpost describing the whole situation: https://blog.branch.io/how-to-deep-linking-from-facebook/一篇描述整个情况的博文: https : //blog.branch.io/how-to-deep-linking-from-facebook/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM