简体   繁体   English

重定向到 facebook messenger 的链接在移动浏览器上不起作用,但在桌面浏览器上起作用

[英]Link to redirect to facebook messenger doesn't work on Mobile browser but works on Desktop Browser

I am trying to redirect from a web page to an m.me/?ref= facebook link which represents a Facebook Page.我正在尝试从网页重定向到代表 Facebook 页面的 m.me/?ref= facebook 链接。 At the Desktop Browser, the redirection is working and opens the facebook messenger.在桌面浏览器中,重定向工作正常并打开 facebook 信使。 When I am trying to do the same on the mobile browser, the redirection is done but the link doesn't open the facebook messenger in browser view or as an application.当我尝试在移动浏览器上执行相同操作时,重定向已完成,但链接未在浏览器视图中或作为应用程序打开 facebook 信使。

Desktop browser: Chrome.桌面浏览器:Chrome。

Mobile Browser: Samsung Internet, Chrome.移动浏览器:三星互联网、Chrome。

Tested ways to redirect: window.location.href, window.open, window.location.replace重定向的测试方法:window.location.href、window.open、window.location.replace

The reason it didn't work is that it was blocked by the browser as a popup.它不起作用的原因是它被浏览器阻止为弹出窗口。 I fixed this issue by putting the redirection to get triggered by a button.我通过将重定向设置为由按钮触发来解决此问题。 Redirect used: window.open使用的重定向: window.open

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

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