(function(){
var win=Ti.UI.createWindow({
exitOnClose:true
});
win.addEventListener("open",function(e){
var webView=Ti.UI.createWebView({
top:0,
bottom:0,
right:0,
left:0,
borderWidth:0,
url:"https://www.instagram.com"
});
win.add(webView);
});
win.open();
}());
DESCRIPTION:
When trying to login to Instagram via Facebook using webview, the authentication process never gets completed but remain stuck forever halfway into the process.
On normal browser and other apps(not written on titanium) using the same webview android component, this is never the case. The authentication process and everything went all well as expected and successfully takes the user to the Instagram homepage.
So obviously, this is a bug associated only with Titanium or otherwise similar other apps would behave similarly as was the with the titanium webview.
I have only tested on IG at the moment, but I'm sure this problem can occur to a lot of other sites too, thus hampering the development of webview based app to a lot of extent.
STEP to reproduce:
1. Copy the pasted code above into the app.js and run the app.
2. Now, login to your Instagram account using Facebook.
3. the authentication process never successfully went through but stuck somewhere into the middle.
On careful examination, a warning message is generated that tells something like this produced -
[WARN] : chromium: [WARNING:spdy_session.cc(2566)] Received WINDOW_UPDATE for invalid stream 5
Not sure if the warning has got to do anything with it.
Hello, I am unable to reproduce this issue with given code and given step. There is no authentication problem occurred. *Steps:* 1. Create a default classic project. 2. Replace code in app.js with following.
3. Build and run the app on android device. 4. When the app opens and the webview is loaded log in to instagram using facebook account. 5. Log in successful and no authentication problem occurred. [Screenshot](https://i.imgsafe.org/5400a88.png) Thanks *Environment*: *Device info:* HTC One (Android 4.4.3) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
Hello, Can you run the test on google nexus device? Because I encountered the problem on google nexus 5 running android 6.0.1 Also, login has to be done via Facebook, and not Instagram issued username and password. thanks!
Hello, I am able to reproduce this issue on Nexus7 (Android 6.0.1). Log in to Instragram using facebook account is not successful for the same code in the previous comment. The authentication process never gets completed but remain stuck forever halfway into the process. One error in console log is visible.
*Console Log:*
Thanks *Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
This is something that I wouldn't advise you to do. Having an app with a webview to sign in using Facebook is not recommended. From this link https://developers.facebook.com/blog/post/2013/06/26/october-2013-platform-changes/ {quote} The following changes will go into effect on October 2, 2013: Native iOS and Android apps must not use their own web views for Facebook Login {quote} If you need authentication, in your app, it's better that you use HttpClient to login. Or if you want to use Facebook, you could use the Facebook SDK.
[~spaceman12] If you have any other questions, feel free to comment. Resolving this ticket.
Hello, Iam not so sure by what you mean "using http client to authenticate". The thing is, Instagram and other similar sites deeply embed Facebook within itself and as our main aim is to access the mobile web version of the Instagram, so it's not possible to use a seperate httpclient to authentic FB and take users again to the web version of Instagram all this occurring in the webview. It will be great if someone can look into this issue and get this fixed ASAP. Thank you
One way of authentication is using the Facebook SDK, https://github.com/appcelerator-modules/ti.facebook That's assuming you are making an webapp or a service that uses Facebook login. From what I understand, you want to access the mobile web version of a service that uses FB login. I'm afraid this is not the ideal way of doing so. Is there another way for you to authenticate? Getting Access Tokens from using httpclient? Cause as mentioned in the previous comment, Facebook itself says you should not use a web view for Facebook login.
Is it possible to explain what you are trying to achieve. Maybe there's a way to do this in another way.
Closing as invalid. If incorrect, please reopen.