Hello,
I have an iPhone app which creates a facebook session and I would like to restore this session on my server to hand off some of the work. I have the iPhone app working perfectly fine, it's just that I am having problems restoring the session - the documentation is lacking, at best (from http://wiki.developers.facebook.com/index.php/Facebook%5FConnect%5Ffor%5FiPhone -"If you want to call the API from your servers, you just need to get the sessionKey and sessionSecret properties from the session and send them back to your servers", that's it).
I think I have a decent start from what docs I have found, and my php page looks like:
require_once 'facebook.php';
$appapikey = 'key';
$appsecret = 'secret';
$userid = 'id';
$sessionKey = 'key';
$facebook = new Facebook($appapikey, $appsecret);
$facebook->set_user($userid,$sessionKey);
However, when I try to login to this page I get the following error:
Fatal error: Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid'
I know that the session is valid because I am still logged in on my iPhone app. Does anybody know how to restore a session that was started on Facebook Connect?
Thank you