Return to Snippet

Revision: 50097
at August 10, 2011 01:53 by jretamal


Initial Code
<?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";
	$paramAmigos  =   array(
		'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
	}
?>

Initial URL

                                

Initial Description

                                

Initial Title
List Friends Facebook API

Initial Tags
php, facebook

Initial Language
PHP