How can I execute FQL query in my application?





Appreciate if you can like this page if you find it useful! - Click "Like"

How to execute FQL query would depend on what SDK you are using.

I have listed some of the ways below:

  • In general, you can execute FQL queries by fetching You can specify a response format as either XML or JSON with the format query parameter.

  • If you are using the PHP SDK, you can take a look at calling the old REST API via the PHP SDK. Sample code is:
$facebook->api(array( 'method' => 'fql.query', 'query' => $yourFQLQuery ));
  • If you are using the JavaScript SDK, you can call the FB.Data.query method.
    It returns a FB.Data.query object which can be waited on for the asynchronously fetched data.




Find my FAQ on Facebook Development useful? Download the PDF for all the FAQs HERE!