What do you do when you have a Facebook app tab (inside an iframe
, mind you) that’s externally linkable? Pop-in.
Let’s break this down.
if (self === top) {
This conditional will be true when the browser is not inside an iframe
.
window.location.href = 'https://www.facebook.com/test/app_1234';
If we are not inside an iframe
, then redirect to the following URL.