2014-01-17 97 views
0

我正在使用php sdk獲取Facebook信息。我有一個Facebook的ID數組。 Facebook的IDS 100003186894762,100002039757708,100001527538655,100005502043347使用配置文件ID獲取Facebook配置文件名

$access_token = $facebook->getAccessToken(); 
$facebook ->setAccessToken($access_token); 
$user_profile = $facebook->api(/100003186894762); 

這裏我得到一個用戶的信息。有什麼方法可以在單個請求中獲取一組信息。

像這樣

$ user_profile = $facebook>api(/100003186894762/100002039757708/100001527538655/100005502043347);

我試着用循環每個請求,但其花費過多時間 $ resultfbid是Facebook的ID數組

foreach($resultfbid as $key=>$fbid) { 
      $user_profile = $facebook->api('/'.$fbid); 
      $posts[] = array('name'=> $user_profile['first_name'], 'id'=> $user_profile['id'],'status'=>$resultstatus[$key]); 
     } 

請幫我找到這個問題的一個解決方案,謝謝

回答

0

這個怎麼樣?

file_get_contents('http://graph.facebook.com/100003186894762/picture'); 
+1

是的,我能得到picture..i需要獲取配置文件name..is有什麼辦法 – Dibish

+0

媽的,我的問題錯了...對不起! –