Page 1 of 2
InAppBrowser still open after successful FB login
Posted: Thu Jul 24, 2014 7:53 am
by Alexis Revue
Hi,
I use Facebook plugin but it seems like I have different behavior between iOs and Android: on iOs, after a successful login, I'm still in the InAppBrowser whereas with Android, I go back to the application which is what I expect. So, with iOS, I open the next page in inAppBrowser instead of navigating to this page in the App. I guess something is wrong with ref.close() but I can't fix it... any guess?
Alexis
Code: Select all
Helper.init = function() {
var callbackUrl = "[url=http://appery.io/app/view/]http://appery.io/app/view/[/url]" + Facebook_Settings.project_id + "/A1_FB_ME.html";
var url = "[url=https://www.facebook.com/dialog/oauth?client_id]https://www.facebook.com/dialog/oauth...[/url]=" + Facebook_Settings['client_id'] + "&redirect_uri=" + callbackUrl + "&scope=&response_type=token";
ref = window.open(url, '_blank', 'location=yes');
ref.addEventListener("loadstart", this.getAccessToken);
};
Helper.getAccessToken = function(event) {
if (event.url.indexOf('access_token') = 0) {
console.log("Extracting access_token...");
var params = event.url.split("access_token=");
var _access_token = params[1].slice(0, params[1].indexOf("&"));
localStorage.setItem('access_token', _access_token);
ref.close();
Appery.navigateTo('A1_FB_ME', {});
}
InAppBrowser still open after successful FB login
Posted: Thu Jul 24, 2014 11:03 am
by Maryna Brodina
Hello!
Could you clarify your iOS version?
InAppBrowser still open after successful FB login
Posted: Thu Jul 24, 2014 11:39 am
by Maryna Brodina
Seems to be a bug, sorry about that.. Bug is reported, we will fix it.
InAppBrowser still open after successful FB login
Posted: Fri Jul 25, 2014 12:28 am
by Alexis Revue
Hi Maryna,
Ok, thank you, I'll wait for the correction
IOS 7.1.2
InAppBrowser still open after successful FB login
Posted: Wed Jul 30, 2014 10:23 pm
by Alexis Revue
Hi,
Any news from that bug?
InAppBrowser still open after successful FB login
Posted: Wed Jul 30, 2014 10:56 pm
by Illya Stepanov
Hi Alexis,
No status update yet, it seems to be a complicated one.
InAppBrowser still open after successful FB login
Posted: Thu Jul 31, 2014 12:10 am
by Alexis Revue
Hi Illya,
Would there be another way to login using facebook without having this issue?
InAppBrowser still open after successful FB login
Posted: Thu Jul 31, 2014 12:14 am
by Illya Stepanov
We are searching for a workaround, we'll let you know.
InAppBrowser still open after successful FB login
Posted: Thu Jul 31, 2014 9:30 am
by Maryna Brodina
Hello!
Please try changing Libraries version to 1.2
InAppBrowser still open after successful FB login
Posted: Thu Jul 31, 2014 3:38 pm
by Alexis Revue
Hello!
It works fine with 1.2, thank you. That's great.
I'm still interested in the fix for 2.0 but I'm not in a hurry 