I am working on an application where I need to integrate the social functionality of Facebook.
In my application there is a button that connects the user to his Facebook profile.
When the user press this button I’m only open a webview with the Facebook site, with the user Facebook page. Now lets say that I know his email and password and I want to connect him automatically, that he not have to enter his email and password every time.
I tried to solve it throw my next question, but as you can see with no success.
I tried also persisting cookies with CookieSyncManager, CookieManager and manually handling.
I think I can solve it by changing the url that I sends to the webView, but I don’t know which url. (tried http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php and http://www.facebook.com/plugins/login.php and then concatenate the url of the user Facebook page, for example http://www.facebook.com/UserProfile)
I really appreciate any help!
Thanks.
There’s a way to use the SDK authentication instead of the SSO as discussed here: How to disable Facebook single sign on for android – Facebook-android-sdk.
But I think that it just results in a bad user experience since the user will need to enter his email/password which is not a fun task to do with most mobile devices.
If the user has the facebook application (katana) installed (which means the use of SSO), then you should be able to just open it with the user profile by using an intent.
I’ve never done it before, but from these two threads:
launch facebook app from other app
and
Open a facebook page from android app
it looks like you can do something like: