Is there any way to force a link to open in Chrome from Facebook's in-app browser?

邮差的信 提交于 2019-12-19 05:48:06

问题


I've got a web app that requires the ability to print. Facebook's in-app implementation of Chrome doesn't allow printing. Currently, I'm giving the user instructions on how to open in chrome themselves in place of the print button I give normal users. But I'd prefer to just open Chrome for them when they get to that page, or at the very least provide a button/link that would open the page in Chrome instead of forcing them to find the settings button and figure out how to open Chrome themselves.

I've tried using the googlechrome://myurl.com approach, and Chrome opens, but the specified url doesn't load.

I've looked into Google's Intent option but I wasn't able to figure out how to open Chrome with that method.

Is there a way to accomplish this in javascript? or by some url scheme in an href attribute?

So far, all the other answers I've found give explanations for how to do this from an Android App, but not from a website.

** Update: The googlechrome://myurl.com seems to work fine from iOS in the native facebook app. It does not appear to work correctly using the native facebook app in Android.


回答1:


Try

googlechrome://navigate?url=example.com

for Android users.

Reference from https://stackoverflow.com/a/12013755/9514189



来源:https://stackoverflow.com/questions/48868048/is-there-any-way-to-force-a-link-to-open-in-chrome-from-facebooks-in-app-browse

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