Include in project

Mar 17, 2010 at 7:20 PM
Edited Mar 17, 2010 at 7:24 PM
Hi there,

I need help in using this authentication.

1. User clicks on facebook connect
2. User log's in at facebook (pop up window) and gets redirected to my site
3. User previously logged in than nothing changed.
4. If new user, create a local profile of the user by getting the user object from facebook. 

How can I do the fourth point? 
I can get the session id of the user, but what about the entire user object?
Can I get the the first name, last name, email and other objects of the user?

How can I make the user registration more easy?

Thanks,
Wasay

-------------------------------------------------

            try
            {
                //Initialize FBConnectLogin class
                FBConnectAuthentication auth = new FBConnectAuthentication(apiKey, appSecret);
                if (auth.Validate() != ValidationState.Valid)
                {
                    // The request does not contain the details of a valid Facebook connect session - you'll probably want to throw an error here.
                }
                else
                {
                    FBConnectSession fbSession = auth.GetSession();
                    string userId = fbSession.UserID;
                    string sessionKey = fbSession.SessionKey;

                    //Try and Log User
                    //*****************************************************//
                    loginUser(auth.userinfo);
                    //*****************************************************//
                }
            }
            catch (Exception exc)
            {
                pnlError.Visible = true;
            }