views:

59

answers:

1

Can we get email address using: users.getStandardinfo?

Please help me on this.

Thank you

A: 

You can't. But you can ask the user to provide it when he/she logs in.

There is proxied_email that can be taken from user table, you can try:

$personArray = $facebook->api_client->users_getInfo( $fb_config->user_id, "last_name, first_name, birthday, hometown_location, current_location, is_app_user, proxied_email" );
$email = $personArray[0]['proxied_email'];
if(empty($email)){
    echo 'Proxied email was not retreived. Trying fql query...';
    $facebookFQLResultXml = $facebook->api_client->fql_query("SELECT proxied_email FROM user WHERE uid=".$fb_config->user_id);
    $email = $facebookFQLResultXml['proxied_email'];
}

But I am not sure for the result

So you can get the proxied email and contact the user through it but you can't extract the original email:

proxied_email - A proxied wrapper alternative for contacting the user through email,

instead of directly calling notifications.sendEmail. If the user shared his or her proxied email address with you, this address also appears in the email field (see below).

http://developers.facebook.com/docs/reference/rest/users.getInfo

infinity
but how http://www.formspring.me (Sign up with Facebook), is fetching email address?
Sandesh

related questions