4

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.com)

  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.

  • 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 Oct 04 '19 at 05: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.com, still wait for their reply. – Nhan Nguyen Tri Oct 04 '19 at 07:48

1 Answers1

12

Up until recently the googlechrome://navigate?url=example.com 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.com#Intent;end';

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

  • you my friend i owe you a party,solved my problem stuck for many days now thanks – Pranay Dutta May 19 '20 at 10:43
  • This is very helpful and worked fine in Jan, 2021. Thanks! – Punit S Jan 20 '21 at 13:28
  • this works well on android, any idea what is the solution for ios? – Drunken Daddy Apr 06 '21 at 07:38
  • To launch Chrome with iOS Facebook we have used window.location="googlechrome://example.com". However, this does not work for Facebook Messenger, and only works if Chrome is installed, and permission prompts may show. – David Western Apr 14 '21 at 12:47
  • 1
    @DavidWestern does it really work ? Chrome is installed on mobile and this still doesnt open in chrome. (Android 11) – user3304007 May 04 '21 at 19:04
  • @user3304007 in our testing this still works for us from pages opened within the Facebook app internal browser. It does not work from pages loaded in Facebook Messenger. My testing is on Android 11. It does NOT force selection of Chrome, but will use the "Default" browser registered within Android. That is often Chrome but could be something different, such as Edge. The intent for us is to open outside of Facebook to allow automatic printing which is not supported in-app. – David Western May 06 '21 at 20:32