Facebook connect JavaScript with PHP
- by skidding
I'm using the JavaScript method to sync/login (with the popup) with Facebook Connect on my site, it seems to work. However, after I get logged in, I want to continue in backend, with the PHP library. I see the cookies are set by the JavaScript lib, but I don't know how to use them with the PHP api. I used
$fb = new Facebook($api_key, $secret);
$uid = $fb->get_loggedin_user();
but not user data is getting passed. How can I get the user data in PHP after I logged in in frontend?
As far as I'm concerned, I would have gone PHP all the way, but I didn't manage to make the auth work, meaning that in never redirected me back to my site :).
Thanks!