2009-10-19 12 views

Répondre

4

Vous devez appeler users.getInfo. En PHP, vous le feriez comme ceci:

$userId = 1234567; 
$fb = new Facebook(FACEBOOK_API_KEY, FACEBOOK_SECRET); 
$fb->api_client->users_getInfo($userId, 'name, pic_square, first_name'); 

Vous pouvez vérifier la function's documentation here.

4
$client = new FacebookRestClient(API_KEY, SECRET_KEY, SESSION_KEY); 
$userinfo = $client->users_getInfo($client->users_getLoggedInUser(), array('first_name','last_name')); 
echo $userinfo[0]['first_name'] . ' ' . $userinfo[0]['last_name']; 
Questions connexes