Facebook connect JavaScript with PHP
Posted
by skidding
on Stack Overflow
See other posts from Stack Overflow
or by skidding
Published on 2010-03-23T17:11:43Z
Indexed on
2010/03/23
17:13 UTC
Read the original article
Hit count: 452
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!
© Stack Overflow or respective owner