You are here

function fbconnect_get_info_from_fb in Facebook Connect 5

Same name and namespace in other branches
  1. 6.2 fbconnect.module \fbconnect_get_info_from_fb()
  2. 6 fbconnect.module \fbconnect_get_info_from_fb()

Query information from facebook user table.

Return value

array

3 calls to fbconnect_get_info_from_fb()
fbconnect_get_fb_avatar in ./fbconnect.module
Recupere l'avatar Facebook de l'utilisateur.
fbconnect_profile_available_import in modules/fbconnect_profile/fbconnect_profile.module
Validate user information available from facebook
fbconnect_profile_insert_user_info in modules/fbconnect_profile/fbconnect_profile.module
Enregistre les informations du profile facebook.

File

./fbconnect.module, line 839
This module allows site visitors to connect and register with facebook account

Code

function fbconnect_get_info_from_fb($fbuid, $fields) {
  if (facebook_client() && $fields) {
    try {
      $result = facebook_client()->api_client
        ->fql_query("SELECT {$fields} FROM user WHERE uid = {$fbuid}");
      return $result[0];
    } catch (Exception $e) {
      watchdog('fbconnect', 'Exception thrown while using FQL: !code', array(
        '!code' => $e
          ->getMessage(),
      ), WATCHDOG_WARNING);
    }
  }
}