i have a box which displays friends of a user, however, it shows them all and stretched off the canvas of the app. I have them in a table in the box, is there anyway to limit the amount shown to 12 random friends?
this is my code to display friends:
if ($user) {
$user_profile = $facebook->api('/me');
$friends = $facebook->api('/me/friends');
echo '<table>';
foreach ($friends["data"] as $value) {
echo '<td>';
echo '<div class="pic">';
echo '<img src="https://graph.facebook.com/' . $value["id"] . '/picture"/>';
echo '</div>';
echo '<font color="white">','<div class="picName">'.$value["name"].'</div>','</font>';
echo '</td>';
}
echo '</table>';
}
?>