简体   繁体   中英

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

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
    });
}

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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