Single Sign On for Android Facebook
Solution 1
Make sure both apps reference the same Facebook app client_id
and client_secret
. Once the user authorizes one of your Android apps, store their access_token
, and share it between both apps.
Solution 2
Perhaps see
Preserving login session across multiple Android apps
and then
Write a private access file to another app's files directory
My solution is to write the login information (I guess access_token
) to a file on both apps and make each app check it's file and the other app's file modification time. the one modified most recent wins.
You would have to write up some code for that..
Senthil Mg
Updated on June 23, 2022Comments
-
Senthil Mg almost 2 years
Friends,
I need to know much about Single Sign On support for Facebook. I have two applications on my device and I have to post the feed. I login the very first time from either one of the applications, but I need it to continue using the same login credential and session for the other application without showing the login page. Is this possible in android? If so please guide me how to implement it.Thanks in advance.
-
Matt Huggins over 13 yearsOne thing to note is that the
access_token
only lasts for a few hours unless you request theoffline_access
extended permission, which makes it last forever (or until the user changes their mind and revokes permission).