6

Facebook updated it's mobile app and created an in-app browser and as they say it's more faster. The problem is that any link of any page opens inside this browser.

I tried a lot of combinations without luck... Some examples are bellow.

Did anyone knows more about it and how to forece links to open on external browsers?

<script>
function externalLinks() {
  for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
    var b = c[a];
    b.getAttribute("href") && b.hostname !== location.hostname && (b.target = "_blank")
  }
}
;

</script>
<a href="http://www.google.com" onClick="externalLinks();">External Link</a>

Other Way:

<a href="http://www.google.com" target="_blank" style="target-new: tab;">Google</a>

Thank you all!

Irene T.
  • 1,393
  • 2
  • 20
  • 40
  • You can't. Why do you want to do that? – WizKid Oct 29 '14 at 21:36
  • 3
    @WizKid - For one, the inapp browser doesn't support file input form elements. ([Here's the bug I filed to FB](https://developers.facebook.com/bugs/304643753056243/)) – Richard Szalay Nov 17 '14 at 00:06
  • Shouldn't the bug report be to fix file input forms then? Or why else would you want to skip it? – WizKid Nov 17 '14 at 00:17
  • 2
    The reason I need to force links to an external browser is that my css media query seems not to be working properly in the in-app browser. There are some rendering issues I assume... – RazorHead Jan 27 '15 at 17:47
  • 1
    @WizKid For me, 2 main reasons. 1, visitors accidentally click the X that closes the FB tab. 2, visitors the FB browser either doesn't have a history of visited pages or it doesn't behave the same as Safari's or Chrome's history. – Ryan Oct 10 '19 at 13:46

0 Answers0