简体   繁体   中英

Facebook Login “Keep me logged in to” Not working

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?

在此输入图像描述

Thanks a lot in advance!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM