how to obtain the facebook uid of a user in php

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-04-21T17:07:49Z Indexed on 2010/04/21 17:13 UTC
Read the original article Hit count: 123

Filed under:
|
|

Hey, I'm writing a canvas app for facebook. I use the command:

$user_id = $facebook->require_login();

To get the userid, but at the first few pages of my app I don't want to require login, but if the user's logged in, I'd like to know what the userid is. Basically I need a "get_login()" command that perhaps returns 0 or null if the user is not logged in. Is there anything like that?

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook