最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - URL Scheme to open ChromeFirefox (Android OS) from Facebook post - Stack Overflow

programmeradmin2浏览0评论

We've a web page that needs to be open in Chrome/Firefox on Android to fully display the content. But when we post the link on Facebook, it always opens the links with its own web browser.

So we're checking if there is a way to force opening the link in Chrome browser from a Facebook post.

Here are some approaches that we tried:

  1. Use Chrome URL Scheme (googlechrome://navigate?url=example)

  2. Use window.location.href, window.open (url,"_system"), etc

  3. And even using the intent to launch chrome from the web browser: What is the intent to launch any website link in Google Chrome

If you have any idea or confirmation that there is no way to force users from Facebook Browser to Chrome (Android OS), please let us know.

We've a web page that needs to be open in Chrome/Firefox on Android to fully display the content. But when we post the link on Facebook, it always opens the links with its own web browser.

So we're checking if there is a way to force opening the link in Chrome browser from a Facebook post.

Here are some approaches that we tried:

  1. Use Chrome URL Scheme (googlechrome://navigate?url=example.)

  2. Use window.location.href, window.open (url,"_system"), etc

  3. And even using the intent to launch chrome from the web browser: What is the intent to launch any website link in Google Chrome

If you have any idea or confirmation that there is no way to force users from Facebook Browser to Chrome (Android OS), please let us know.

Share Improve this question asked Oct 4, 2019 at 3:23 Nhan Nguyen TriNhan Nguyen Tri 511 silver badge3 bronze badges 2
  • that is a question to Facebook developers. As well, it is totally up to them - how they want to open the links in their app. – Vladyslav Matviienko Commented Oct 4, 2019 at 5:44
  • @Vladyslav: We checked and we can open Chrome/Firefox on iOS Facebook app. But we haven't found a solution for this to work with Android Facebook app. And we did post a message on developer.facebook., still wait for their reply. – Nhan Nguyen Tri Commented Oct 4, 2019 at 7:48
Add a ment  | 

1 Answer 1

Reset to default 13

Up until recently the googlechrome://navigate?url=example. approach worked on both Android/iOS Facebook links when using an href with target="_blank". Recently this stopped working on Android Facebook. The only workaround I have found that works is to use an intent: link that does not specify a package path for Chrome. It will open the link using the default browser, so is not guaranteed to be Chrome. The specific link format that worked was:

window.location = 'intent:https://example.#Intent;end';

IT appears that the intent is matching a generic URL to use the default selected browser when no package is specified.

发布评论

评论列表(0)

  1. 暂无评论