php - Facebook Query Language gives just user ids -


i'm trying print friends of user uses application.using facebook query language(flq) it. query gives user id's.how can usernames profile pictures

here code:

require 'facebook.php';  $facebook = new facebook(array( 'appid'  => 'xxxxxxxxxxx', 'secret' => 'xxxxxxxxxxxxxx', 'cookie' => true, // enable optional cookie support ));  $session = $facebook->getsession(); if ($session) { try { $some_friends = $facebook->api(array(       'method' => 'fql.query',       'query' => 'select uid2 friend uid1='.$facebook->getuser().' limit 10'     )); } catch (facebookapiexception $e) { error_log($e); } } print_r($some_friends); 

here result:

array (      [0] => array ( [uid2] => 521117187 )      [1] => array ( [uid2] => 526583873 )      [2] => array ( [uid2] => 527579769 )      [3] => array ( [uid2] => 531219912 )      [4] => array ( [uid2] => 533654770 )      [5] => array ( [uid2] => 539141589 )      [6] => array ( [uid2] => 539243220 )      [7] => array ( [uid2] => 539342366 )      [8] => array ( [uid2] => 549294033 )      [9] => array ( [uid2] => 557508969 )      ) 

solved...

you can picture posting uid

http://graph.facebook.com/uid/picture

example http://graph.facebook.com/557508969/picture

enter image description here

also name getting http://graph.facebook.com/557508969/ (json encoded)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -