6

I'm integrating Facebook login into my C# Desktop Application. I use facebook login by opening the following url in a webview.

https://www.facebook.com/dialog/oauth?client_id=&redirect_uri=https:%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&response_type=token&display=popup&scope=email%2Cuser_about_me%2Cuser_birthday

The page opens fine and I can log in to facebook successfully. However, the option "Keep me logged in to" doesn't work - every time I restart the C# app, I need to type in my password again to login even though I have checked the option in the last login.

The interesting thing is that my email address is always remembered by the facebook login dialog box regardless of whether I have checked the "Keep me logged in" option or not. Hence, facebook is definitely aware who logged in last time but it is not actually keeping the login session.

So can anybody please help advise what is wrong here?

Please not that:

  1. On my facebook app setting, I have made the app public
  2. In the client oauth setting, I have enabled Client OAuth Login/Web OAuth Login/Embedded Browser OAuthn Login
  3. I have added WebSite as the platform, Site URL is http://localhost/
  4. The app has not been submitted for review yet, could it be the problem?

enter image description here

Thanks a lot in advance!

2
  • i don´t think that´s related to your app, it is a facebook feature. you should check the browser settings.
    – andyrandy
    Jun 30, 2016 at 12:48
  • @luschn Thanks for your response. Could it be related to the cookie settings of my browser? I'm using web view control as part of xaml. Thank you.
    – Bon
    Jul 1, 2016 at 1:21

1 Answer 1

5
+50

The "keep me logged in" feature is DEFINITELY using a cookie. You might investigate whether the underlying browser technology in the Web View control is configured to save cookies when it's invoked inside of an application, and whether or not you can specifically get it to save cookies. From what I'm reading the control uses Edge.

It makes perfect sense, within the context, to have the default behavior NOT save cookies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.