问题
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