Facebook Authentication in Webview

2020-07-17 08:11发布

问题:

I am building a native android app that require facebook login each time it's initiated. This authentication is done using the FB SDK (SSO).

Later on in the app, the user opens a WebView to the mobile versions of facebook profile page (http://m.facebook.com/some page). My problem is that when opening the webview, the user is required to enter user name and password for the facebook site. Since I already have a facebook access token, and the user might have installed the facebook app, I assume there some way to skip this annoying phase of signing in to facebook website in the webview.

I have searched the web and tried different solution with no success. It will help me a lot if someone could posts a solution code that works. Thank you!

回答1:

There's tutorial available on Developer site of Facebook for Single-Sign-On (SSO) login. One is using webview and another is using SDK.
Although I think if the user selected remember the password checkbox, it should not ask for login again.