FB.login() inside inapp browser (no popups) - facebook

I have my Facebook login process working on desktop and mobile, except for Facebook's inapp mobile browser (ios and now android). The issue is that if you call FB.login(), nothing at all happens. I assume this is because the inapp browser doesn't deal with popups.
I understand that a redirect auth flow circumvents the need for a login/permissions popup, however I have built a web-app, which means it is a pain to deal with storing the users current state at the point of signing in.
Does anyone have any good solutions for this?
Also I have tested many other sites login buttons through the inapp browser, and all of the ones I have tried so far don't work. Facebook has done a great job of breaking a large amount of sign up processes.

As stated in the comments, that seems to be a bug either in the Android FB- App or in the Android 5 WebView component. There is a bug report at facebook, but they are still working on it. The only solution i could find for now is to turn off the internal browser: http://www.androidpit.com/facebook-disable-browser
Because that action has to be taken by the user itself, it's no satisfying solution. Therefore i guess the only thing we can do at the moment is to stay tuned for facebooks fix.
Update
Facebook confirmed this is a bug. They are working on it. Stay tuned...
2nd Update
Facebook rolled out a patch. Works for me now.

Related

facebook login oauth and osx 10.11/CNA

a little background:
I have an hotspot page wich integrate with facebook login oatuh. The app runs on facebook api v.2.4 and uses node/express/passport to handle the login process
The only option i pass to the oauth fb page is display: touch, so the login page works fine without cookie support
the issue:
since a few days , only on osx 10.11/cna the login can't be processed because of no cookie support in CNA (this should mean that fb ignores the display option, in this case only)
the same request made from a ios device from within the cna works fine
I've already confirmed the display option is actually send, so my best guess is that fb started overwriting/ignoring this option. Also I can't find any reference in the fb api docs anymore (except for display=popup in the manual login page)
Any hint about this ?
thanks
g
Not sure if you still have this issue, but I can confirm facebook login definitely works end to end inside the CNA on 10.11. The CNA does allow cookies, what it doesn't allow is access to existing cookies in safari or access to localStorage and sessionStorage.
If you have your FB sdk configured with cookies=false, this may well be your issue. When set to false I believe the sdk is then attempting to use local storage.
The other thing to check would be what you have in the walled garden list. We have just got to the bottom of this issue after a lot of frustration. Allowing certain CDN networks actually causes iOS to complete it's internet check and no longer think it's behind a captive portal. I added an answer here https://stackoverflow.com/a/41273984/4427589.
As I said, I can confirm it definitely works end to end inside the popup.
Cheers
Paul

What's the correct way to authorize PhoneGap application to the Facebook?

I spent a while already to fix annoying issue with Facebook in PhoneGap app. And still a lot of things goes wrong with that. The thing is that I use Appery.io and Facebook plugin.
This is how my Facebook console looks now:
I suggest that localhost might be a reason of the issue. However, I got it into Facebook_Helper.js:
Everytime I try to sign in with FB account, I get the same error at the child window:
So what I've got is that app is authorized at this moment indeed, because there's a menu button at the navbar that allows me to navigate through FB profile:
The first issue lies in that the child window never gets closed automatically once user submitted Sign In form. And the second one is that I can't get the access token to the app directly. I know I'm doing something wrong, but I spend more than a week on that and nothing was clarified.
Honestly, I've no idea why it's not working. I saw a lot of apps written in PhoneGap that use the same authorization too, and they work as it should. Will be appreciate if you take a look into that and, maybe, advice something.
First, I don't see iOS or Android in your developer.facebook screenshot.
Second, you should implement native facebook integration if you are developing an app, if I understand correctly from your code, you are trying to handle only web browser version of authentication. Native integration is both the suggested way by facebook and platforms and better experience for end users. If users have facebook app installed, authenticating over fb app is more secure after all..
You can use a cordova plugin for facebook integration, here is one of the plugins (I am one of the authors): cordova-facebook plugin

FB.init() callback stopped been called

I know that there are similar question, but I think that my situation might be different.
I have two facebook applications. One is for develop - it works in sandbox mode and works with localhost. The other one is for production, with the sandbox mode off and an active ssl.
I haven't used develop app for some time, and now I've found that FB.init() is not called anymore. However, in Google Chrome browser everything works fine, and production server works in all browsers. What can be the reason of this problem? Did Facebook got some king of update or something like that? Maybe it stopped to work because develop app needs SSL too?
Took me some time, but I figured it out. Now to use your develop non ssl applications on facebook, first you have to go into Security tab in facebook account settings and set Secure Browsing to disabled.
What I can't understand, why I haven't got any notification from facebook about this issue? If there was some kind of notification, then it was too hidden.

When using OpenID login within an iOS app is it better to use Safari for login and then redirect back to app?

I'm building an app that uses OpenID for authentication. I'm giving Google, Yahoo and the general OpenID site as options.
At present, when the user selects a site, I open a UIWebView and the user performs their login with that frame, all within the app.
However, it has struck me that when using UIWebView, you cannot easily show to the user that the connection is over https or that they are indeed at the site I'm claiming they are at. I could be easily harvesting passwords.
Would it be, and I'm looking for opinions on this, be better from a user confidence perspective to actually open Safari when the user selects a login and once they've logged in have Safari direct me back to app?
Thanks
Most people using iOS devices are used to the way Facebook logins work; no URL bar, no nothing. I'd just follow the typical workflow. You could bump out to Safari, and return via a custom URL scheme. However, I think users will think that is more weird. iOS users are not used to being jumped in and out of different apps.
just my 2 cents, it would be also faster if the user has already logged in those services with Safari before.
Prompting out a UIWebView and switching to Safari is using the same amount of steps, so why not?
I thought I'd follow up on this thread to say I'm having difficulties getting the app approved and I think it's because I use the Safari approach. I've had it rejected by Apple twice now because:
"Apps that link to external mechanisms for purchases or subscriptions to be used in the app, such as a “buy" button that goes to a web site to purchase a digital book, will be rejected "
I think it's because I'm launching Safari. I've opened a dispute with Apple and I'll come back with more information once I hear back from them. I really hope a quick change to a UIWebView will help!

FB.login callback not working on Opera Mobile browser

I am testing our web application on OPera Mobile. We have a signIn through facebook link. It takes me to the login page, but after I enter my ID and password nothing happens. If I click on the login button mutliple times, it gives me too many failed attempts error. But after this my facebook account seems to be logged in.
If I login to facebook and come back to our application and click on login, nothing happens, I see a blank page. After I did Javascript debug, I could see that the FB.login() callback is not running at all.
Can any of you tell me what could be the reason?
Thanks,
Yamini
Facebook Connect contains some browser sniffing (or "pseudo-browser-sniffing", detecting some features and making assumptions about what browser is used and what other features are available). They have functionality that uses HTML5's window.postMessage() which ought to work just fine in latest Opera on both desktop and mobile, but due to the unfortunate sniffing approach they send Opera down another branch in their script. To be fair, this is for historical reasons, the postMessage() support was in flux for a while while HTML5 was shaping up and getting agreement on all details, so there are probably still some implementations (earlier Opera and IE versions?) that are still in use and would not work with Facebook Connect's JS.
Ideally, Facebook would fix this. I will follow up with Opera (to double-check that what I recommend Facebook should do will work on Opera Mobile) and Facebook (to try to get their browser detection adjusted).