facebook login oauth and osx 10.11/CNA - facebook

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

Related

Keep me logged in option in facebook desktop login flow not working

I must use facebook integration within desktop app on OSX. I've used part of facebook sdk for ios and modified all ui elements to properly work on desktop.
I'm presenting facebook dialogs within webView, display is set to popup, and redirect url is https://www.facebook.com/connect/login_success.html.
Everything seems to work fine (all the dialogs are working after login, token and expiration date seems to be ok and are stored between web sessions) except for the facebook cookies which are always set to be session only (even with the keep me logged in option turned on). This means user has to log in to facebook everytime app is opened which is really frustrating.
I've already tried setting display to other values (touch, page) with no success. Probably all relevant settings in facebook app are checked (Native or desktop app?, Embedded Browser OAuth Login, Client OAuth Login).
so the question is if anyone has encountered same problem or might know the solution to make keep me logged in option working properly?

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

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.

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).

iOS - being logged-in in a webView after logging in with the SDK

I'm building an iPhone app that has some social features. I've managed to get the user to log-in to Facebook within my application.
I've also implemented a webview that loads a facebook iPhone-optimized page. What I now want to do is my user to be logged-in within the webview without having to log-in twice (once in the app and once in the webview)
I've tried a few things playing around with the access_token in the URL but it didn't work.
Does anyone know if it is possible to implement that and how to do it?
Thanks in advance for your help
Short answer: You're probably not supposed to be able to do that.
The idea is that your app should only store an authentication token that lets you do stuff as your app (e.g. post to the wall as your app). On the web version, the user is logged in to facebook and facebook additionally passes an authentication token to your website; on the iOS version, I think you never get the Facebook session cookie, and I'm pretty sure you need the Facebook session cookie to be logged in to the web side of things (especially since it's designed for the browser — logging out of Facebook logs you out of Facebook Connect on all sites).
There are loads of things you can do to work around this — it's trivial to just ask the user for a username/password (and the whole idea of a "trusted UI" inside a UIWebView inside your app is flawed, despite Facebook's claims).
The "right" thing to do is to implement everything using calls to the iOS SDK so you don't have to bother with the web side of things.
were you testing your app on the simulator or on the device? The reason i ask is because im trying to get the app to stayed logged into fb which it does, sorta...it still pops a fb dialog saying it logged in fine and the user has to click on an OK button.
I havent had time to test it on the device but i think it may have to do with the fact that with the OAuth 2.0, with 3.2.x or >...if the fb is installed, it uses the fb-app login but if its not installed it uses the safari web login.
Since simulator doesnt have the fb app installed, it actually uses the safari web login (i humbly deduced) which would otherwise store a cookie and maybe it doesnt do so on the simulator..dunno, im still looking for the answer on that one :)

Blank popup with FB connect

I've implemented the facebook connect using Javascript SDK. The authentication works fine when the user I'm trying to authenticate is not logged into facebook. But when he's already logged into facebook the login popup never closes. The url of the popup starts with "http://static.ak.fbcdn.net/connect/xd_proxy.php#cb=....."
This happens both on Firefox 3.5 and on Chrome.
Any suggestions? Do I need to set any extra parameters while connecting to Facebook?
I've encountered the same error today, with my year old implementation. I've added the channelUrl tag to FB.Init(), without any luck; so I started the login procedure from scratch with the js sdk, oauth2 enabled: with some minor changes, everything started to work misteriously again. I've run my pages through the Facebook debug tool as well, it suggested some changes as well.
To sum up: basically, if Facebook Connect stops working, upgrade your code according to the latest documentation avaliable.
No special parameters are needed. This is probably a browser problem. Maybe you have a setting/plugin somewhere that does not allow Javascript to close a window for you.
The easiest way to test this is to post a link to your implementation so that other people (with other browser setups) can give it a try.