Page 1 of 1

Prevent App from Opening ChildBrowser in a new window

Posted: Sun Jun 23, 2013 2:47 am
by Rommel Paras

The Facebook integration example uses a childBrower to open Facebook. On desktops, this causes the browser to open another tab/window. How do I prevent this from happening?

I tried changing window.open to window.location and location.href but doing so breaks the login process (e.g. can't get the code returned by Facebook).

I just want the app, when viewed as a mobile web version, to not open a new tab/window when you click login: http://appery.io/app/view/b7685864-bd... just like on our regular site (mpyr.com).


Prevent App from Opening ChildBrowser in a new window

Posted: Sun Jun 23, 2013 4:16 pm
by maxkatz

You could put an if-statement if the app is running as hybrid (PhoneGap installed), open in child window. If running as mobile web, open in the same window. When you open in the same window, you will still need to implement oauth2 sign in into Facebook (read the token, etc).


Prevent App from Opening ChildBrowser in a new window

Posted: Mon Jun 24, 2013 6:21 pm
by Rommel Paras

I tried that but for some reason there was a problem obtaining the code (and therefore the token).

I'll try re-implementing it and place the link to it here.