2009-10-19 164 views

回答

4

您必須調用users.getInfo。在PHP中,你會做這樣的:

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

您可以檢查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']; 
相關問題