It does echo back the email as well. I figured it out. Had something to do with the text box layout. It's showing up fine now. Setting the email up was a pain though, had to ask for an extra permission in order to receive it. You were able to see my php file? Any obvious errors? It seems to work fine. Heres a copy of it, I'm new to php so I'll take any help I can get. :)
<?
// Remember to copy files from the SDK's src/ directory to a
// directory in your application on the server, such as php-sdk/
require_once('facebook.php');
$config = array(
'appId' => 'xxxxxx',
'secret' => 'xxxxxxx',
);
$facebook = new Facebook($config);
$user_id = $facebook->getUser();
?>
<?
if($user_id) {
// We have a user ID, so probably a logged in user.
// If not, we'll get an exception, which we handle below.
try {
//$info = $facebook->api( '/me/groups', 'GET');
//$ct = count( $info['data'] );
//$user_groups = $facebook->api('/me/groups','GET');
$user_profile = $facebook->api('/me','GET');
echo $user_profile['name'] . "," . $user_profile['link'] . "," . $user_profile['id'] . "," . $user_profile['first_name'] . "," . $user_profile['last_name'] . "," . $user_profile['username'] . "," . $user_profile['email'] . "," . $user_profile['gender'] . "," . $user_profile['timezone'] . "," . $user_profile['locale'] . "," . $user_profile['verified'] . "," . $user_profile['updated_time'];
} catch(FacebookApiException $e) {
// If the user is logged out, you can have a
// user ID even though the access token is invalid.
// In this case, we'll get an exception, so we'll
// just ask the user to login again here.
$login_url = $facebook->getLoginUrl();
echo 'Please <a href="' . $login_url . '">login.</a>';
error_log($e->getType());
error_log($e->getMessage());
}
} else {
// No user, print a link for the user to login
$login_url = $facebook->getLoginUrl();
echo 'Please <a href="' . $login_url . '">login.</a>';
}
?>