简体   繁体   English

有没有办法强制从Facebook的应用内浏览器中打开Chrome链接?

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

I've got a web app that requires the ability to print. 我有一个需要打印能力的网络应用程序。 Facebook's in-app implementation of Chrome doesn't allow printing. Facebook的应用内Chrome实现不允许打印。 Currently, I'm giving the user instructions on how to open in chrome themselves in place of the print button I give normal users. 目前,我正在向用户提供有关如何打开chrome本身的说明,而不是我给普通用户打印的按钮。 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. 但我希望只是在他们到达该页面时为他们打开Chrome,或者至少提供一个按钮/链接,可以在Chrome中打开该页面而不是强制他们找到设置按钮并找出如何打开Chrome自己。

I've tried using the googlechrome://myurl.com approach, and Chrome opens, but the specified url doesn't load. 我尝试使用googlechrome://myurl.com方法,Chrome打开,但指定的网址没有加载。

I've looked into Google's Intent option but I wasn't able to figure out how to open Chrome with that method. 我查看了Google的Intent选项,但我无法弄清楚如何使用该方法打开Chrome。

Is there a way to accomplish this in javascript? 有没有办法在javascript中实现这一点? or by some url scheme in an href attribute? 或者通过href属性中的某个url方案?

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. 到目前为止,我发现的所有其他答案都解释了如何从Android应用程序执行此操作,而不是从网站进行解释。

** Update: The googlechrome://myurl.com seems to work fine from iOS in the native facebook app. **更新:googlechrome://myurl.com似乎在原生Facebook应用程序中从iOS正常工作。 It does not appear to work correctly using the native facebook app in Android. 使用Android中的原生Facebook应用程序似乎无法正常工作。

Try 尝试

googlechrome://navigate?url=example.com googlechrome://浏览URL = example.com

for Android users. 适用于Android用户。

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

暂无
暂无

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

相关问题 有没有办法从Facebook浏览器(onClick)重定向用户强制URL在chrome或任何其他浏览器中打开? - Is there a way to redirect users from facebook browser (onClick) enforcing the URL to open in chrome or any other browser? 从 Android 上的应用内浏览器重定向到 Chrome 的最佳方式? - The best way of redirecting to Chrome from in-app browser on Android? 有什么方法可以使用 Android 中的 JavaScript 或 Python 将用户从 Instagram 等应用内浏览器重定向到 Google Chrome 浏览器? - Is there any way of redirecting user from In-app browser like Instagram to Google Chrome browser using JavaScript or Python in Android? 如何从 Instagram 应用内浏览器页面链接打开默认浏览器? - How open default browser from instagram in-app browser page link? 带有来自相机的输入的视频标签可在 iOS 上的 Safari 中运行,但既不能在 Chrome 中也不能在任何应用内浏览器中运行 - Video tag with input from Camera is Working in Safari on iOS but neither working in Chrome nor in any In-app Browser 有没有办法强制链接在外部浏览器而不是Facebook应用内浏览器中打开? - Is there a way to force links to open in external browser instead of Facebook in-app-browser? 如何在外部浏览器而不是应用内(instagram、iPhone)中打开链接? - How to open link in external browser instead of in-app (instagram, IPhone)? 如何在外部浏览器而不是应用内打开链接? - How to open link in external browser instead of in-app? 限制用户在应用内浏览器中打开电子邮件链接 - Restrict user to open email link in-app browser 强制 facebook 在智能手机的外部浏览器中打开链接 - Force facebook to open link in external browser for smart phones
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM