Getting your friends out of facebook

The code below lists the names of all your facebook contacts.  Quite handy....
<?
$friends = $facebook->api_client->friends_get();
foreach($friends as $friend)
{
    $name = $facebook->api_client->users_getInfo($friend,'name, status, hometown_location.city');
    echo $name[0][name].'<br />';
}
?>

Keep an eye on the blog to see how I evolve this script.

Advertisements