More on Google Friends connect integration server side
Mon Nov 30 2009
When a user loggs in via Google freind connect we should do
this:
Get user's Freind Connect ID - some type of unique ID from GFC website.
Not sure yet how this looks, maybe a numeric string, maybe some other type
of string, but its unique.
Check to see if we have a record in USER with this GFC id
if not, then add new record to USER - use preferredUsername for username but
only if it's available, if not, then auto-create a new
username for this user.
We don't really need this for GFC user to be able to login and post
messages and comments. But we DO need some unique name to create user's
blog subdomain.
We can also just ask the user to pick his own sub-domain when he tries
to add his first blog message.
Then in USEROPTION we should add JUST userinfo_id and nothing else, OK
maybe just 'gender' if it's not unspecified on his retreived open social
profile.
Also create an empty record in PREFERENCES so that later this user can
edit his preferences.
The main idea is that for GFC users we don't store the profile in our
database and instead retreive the profile fields from GFC API and create
profile object from that data and store the profile
object in SESSION
This is because a GFC user may edit his profile on GFC site at any time
and it wll not be synched with out profile.
We usually only need the full name, nickname, avatar and sometimes
gender.
If GFC user already exists in USER table then just update LOGIN_LOG
table