Reputation: 87
i am new at facebook application development i want to know how fql query works i used it in my application but i want to know where fql query results are displayed or how they can be displayed if you can't explain plz send me the link because the official documentation didn't helped me either.
Upvotes: 0
Views: 2755
Reputation: 1057
You can use the Facebook Graph Explorer https://developers.facebook.com/tools/explorer And select under the Access token field, "FQL query". Now you can try FQL queries and see the result of them.
Upvotes: 0
Reputation: 2310
ini_set('display_errors',1); error_reporting(E_ALL); require_once 'library/facebook/src/facebook.php';
$facebook = new Facebook(array( 'appId' => 'YOUR API ID', 'secret' => 'YOUR APP SECRET', 'cookie' => true, // enable optional cookie support ));
FQL
try {
$me = $facebook->api('/me');
$currentPage=1;
$currentPost=1;
$currentDate="";
$list="";
$arrDate=array();
$fql = "YOUR FQL STATEMENT HERE";
$param = array(
'method' => 'fql.query',
'query' => $fql,
'callback' => ''
);
$fqlResult = $facebook->api($param);//Here you have your FQL result set
foreach($fqlResult as $row){
//Do something to the result
}
} catch (FacebookApiException $e) {
error_log($e);
}
Upvotes: 2