6

We have a central webpage on site that redirects user to some specific page based certain conditions. The redirect logic is coded in JavaScript, using window.location.href But this redirection always fails in Facebook In App Browser, it works well in all other mobile browsers except the Facebook In-App-Browser version 323.

I have tried all the other possible JavaScript redirection options listed below but all of them seems to fail.

<html><body><script type='text/javascript'> window.open("http://conv-test.mnetads.com/client-side-second-hop/");</script></body>


<html><body><script type='text/javascript'> eval('window.location.href ="http://conv-test.mnetads.com/client-side-second-hop/"');</script></body>

<html><body><script type='text/javascript'> setTimeout(window.location.href ="http://conv-test.mnetads.com/client-side-second-hop/", 10000);</script></body>


<html><body><script type='text/javascript'> setTimeout(window.onload = function(e){ location.replace("http://conv-test.mnetads.com/client-side-second-hop/"); }, 5000);</script></body>

<html><body><script type='text/javascript'>  window.location ="http://conv-test.mnetads.com/client-side-second-hop/";</script></body></html>
// Sets the new location of the current window.

<html><body><script type='text/javascript'>  window.location.assign("http://conv-test.mnetads.com/client-side-second-hop/");</script></body></html>
// Assigns a new URL to the current window.

<html><body><script type='text/javascript'>  window.location.replace("http://conv-test.mnetads.com/client-side-second-hop/");</script></body></html>
// Replaces the location of the current window with the new one.


<html><body><script type='text/javascript'>  self.location ="http://conv-test.mnetads.com/client-side-second-hop/";</script></body></html>
// Sets the location of the current window itself.

<html><body><script type='text/javascript'>  top.location ="http://conv-test.mnetads.com/client-side-second-hop/";</script></body></html>
// Sets the location of the topmost window of the current window.

<html><body><a href="http://conv-test.mnetads.com/client-side-noreferrer/" id="max">Max</a><script type="text/javascript"> document.getElementById("max").click();</script></body></html>

<html><body><script type='text/javascript'>document.location.href ="http://conv-test.mnetads.com/client-side-second-hop/";</script></body></html>

<http-equiv="refresh" content="0; url='http://conv-test.mnetads.com/client-side-second-hop/'">
Vipresh
  • 1,250
  • 15
  • 31

3 Answers3

1

that's is a bug. And It is fixed in the comming new versions. I tested it already.

Evan Lee
  • 738
  • 15
  • 36
  • You mean new version of Facebook App? Any idea how to handle for users who wont update their app for some time in near future? – Vipresh Jun 24 '21 at 12:19
0

v323.0.0.46.119 is the version which had issue. The new version v324.0.0.48.120 doesn't have this bug.

Shashank
  • 712
  • 15
  • 33
-1

There is an new version of Facebook App now. The JavaScript redirection is working in facebook in-app browser.

Max Ma
  • 1