I am trying to log in a user to facebook using an offline token (I had it working for a long time), but it seems maybe facebook changed something?
Quick Run Down:
I had the Facebook PHP SDK (2.1) Authentication through OAuth. I recall the return data after getting an access token was something like:
callbackurl?session={access_token:....,expires:....,session_key....}
etc.. Basically a JSON object in the URL.
But now it appears they have changed parameters and all I get back is something like this:
[fb_199972360033499_access_token] What are these digits?
[fb_199972360033499_user_id]
(I have tried with (PHP SDK 2.1 and 3.1.1)
Previously I was storing setting up saved token data with
$facebook->setSession($dataArray);
But now I no longer know what to do, if anyone has any clues on where to look Id appreciate it, as I have a hard time finding the right instruction in the actual FB documentation.
New PHP SDK
For examples on using the new PHP SDK you should look:
https://github.com/facebook/php-sdk
http://developers.facebook.com/blog/post/534/
It’s also a good idea to take a look at the source code.
Offline Access
http://developers.facebook.com/docs/authentication/
If you have an authorised user you can now get the user
access_tokenwith:If no authorised user is available it will return the application access token.
To get the user id:
Application Id
Those digits should be your application id.
Persistant Data
This should no longer be necessary as the PHP SDK takes care of that. Unless you want to store your own data – in which case you should create your own session data.