/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php include("libs/fbmain.php"); //Hacemos una consulta a la BBDD de facebook por medio de FQL $fqlAmigos= "select uid, name, pic_square from user where uid in (SELECT uid2 FROM friend WHERE uid1 = ".$uid.") order by name asc"; 'method' => 'fql.query', 'query' => $fqlAmigos, 'callback' => '' ); $fqlResultAmigos= $facebook->api($paramAmigos); //Variable con el resultado de la consulta FQL //Recorremos los resultados. foreach($fqlResultAmigos as $key => $val) { echo $val[uid]; //UID echo $val[name]; //NAME } ?>
Comments
