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

不打扰是莪最后的温柔 提交于 2021-01-01 06:12:35

问题


I have a Cordova app that uses the plugin cordova-universal-links-plugin. The deep linking works on other social applications but not with Facebook Messenger. Instead, it opens the built-in browser and redirects it to the link.

Here's my config.xml

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

And in my Cordova app:

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

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

回答1:


Ran into a similar issue myself, and unfortunately, it looks like FB uses their own different scheme for linking called FB App Links.

The webpage for app links: https://developers.facebook.com/docs/applinks/

A blogpost describing the whole situation: https://blog.branch.io/how-to-deep-linking-from-facebook/



来源:https://stackoverflow.com/questions/51396021/facebook-messenger-opens-built-in-browser-instead-of-deep-linked-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!