file_get_contents(http://uk3.php.net/file_get_contents)またはphpでcurlを使用して、次のようなURLにリクエストを発行する必要があります。
https://graph.facebook.com/?ids=id1,id2,id3&fields=name,picture
(id1、id2を自分のIDに置き換えます)
これにより、jsonオブジェクトが返されます。次に、デコードして(http://uk3.php.net/json_decode)、これをループして情報にアクセスする必要があります
これで始められるはずです
// people array uses the users id as the key and the dessert as the value. The id is then used in the query to facebook to select the corresponding value from this array
$people = array("id1"=>"favourite "dessert", "id2"=>"favourite dessert", "id3"=>"apple pie");
$json = file_get_contents('https://graph.facebook.com/?ids=id1,id2,id3&fields=id,name,picture');
$json = json_decode($json);
foreach($json as $key=>$person){
echo '<p><img src="'.$person->picture.'" alt="'.$person->name.'" />';
echo $person->name.'\'s favourite dessert is '.$people[$person->id'];
echo '</p>';
}
ここでリクエストをバッチ処理しました。または、ユーザーごとに10個の個別のクエリを実行することもできますが、それは少し無意味で非効率的です。