FacebookRestClient::users_getInfo PHP Method

users_getInfo() public method

Returns the requested info fields for the requested set of users
public users_getInfo ( array $uids, array $fields ) : array
$uids array an array of user ids
$fields array an array of strings describing the info fields desired
return array of users
    public function users_getInfo($uids, $fields)
    {
        return $this->call_method('facebook.users.getInfo', array('uids' => $uids, 'fields' => $fields));
    }

Usage Example

Example #1
0
<p><a href="http://api.facebook.com/login.php?api_key=<?php 
echo $facebook_api_key;
?>
" target="_blank">log in to facebook</a></p>


<form method="GET"><p>then paste the token from the url here: <input type="text" name="auth_token" size="20"><input type="submit" value="finish login"></p></form>

<?
   }
}

if ($session_key) {
  echo "<p>logged in as $uid, with sess key $session_key</p>";
  echo "<p>Trying to getInfo</p>";

  try {
  $r = $client->users_getInfo(array($uid), array("about_me", "affiliations", "birthday", "books", "clubs", "current_location", "first_name", "gender", "hometown_location", "hs_info", "interests", "last_name", "meeting_for", "meeting_sex", "movies", "music", "name", "political", "pic", "relationship_status", 'quote', "school_info", "tv", "work_history"));
    } catch (Exception $e) {
      echo "<script>location.href='?newsession_req=1'</script>";
      exit;
    }

  echo "<div clear='all'><p>user info:</p><pre>".htmlspecialchars(var_export($r, TRUE))."\n"
  .htmlspecialchars($client->last_xml)
  ."</pre>";

}

?>
All Usage Examples Of FacebookRestClient::users_getInfo