Java – Facebook authentication in Webview

Facebook authentication in Webview… here is a solution to the problem.

Facebook authentication in Webview

I’m building a native android app that requires a facebook login every time I launch. This authentication is done using the FB SDK (SSO).

Later in the app, the user opens the WebView to the mobile version of the Facebook profile page (http://m.facebook.com/some page). My problem is that when opening WebView, users need to enter the username and password of the Facebook site. Since I already have a Facebook Access token, and the user may already have the Facebook app installed, I’m assuming there are ways to skip this annoying login stage and access the Facebook website in WebView.

I searched online and tried different solutions without success. If someone can post a working solution code, that would help me a lot. Thanks!

Solution

Single

sign-on (SSO) tutorials are available on Facebook’s developer site. One is >using webview using SDK .
Although I think if the user selects the remember password checkbox, it shouldn’t ask for login again.

Related Problems and Solutions