I've been trying to add Facebook Connect to a website, but it didn't seem to get the user id after logging in. So, after a bit of checking around, I discovered what seems to be the problem:
The facebook library expects $_REQUEST['session'] to exist (in the getSession() function), but when I output the $_REQUEST, I get this structure:
Array
(
[url]
[base_domain_AppID]
[AppID]
[AppID_user]
[AppID_ss]
[AppID_session_key]
[AppID_expires]
)
where AppID is the application id.
Any idea why this is happening?
I see that the $_REQUEST['session'] is supposed to have some fields called 'uid', 'access_token' and 'sig'.. the 'uid' is AppID_user, but I have no idea about the other two. I'm thinking that, if there's no other solution, I can convert this data to the object it's expecting, so it can pass the validateSessionObject() function.
I don't know if this is relevant, but this happens regardless of whether I enable cookie support or not.
I downloaded the libraries today, so I don't think I'm using an older version of them.
Edit: in the meantime, I've managed to match most of the fields in my $_REQUEST to the ones expected in the session, except that there's no field called 'access_token'.