Getting the number of installations of an application using FQL
We can use the Facebook
insights table to query for the number of installations of our application up to a specified date. Here, we will show you how to do it.
You should have created
config.php as mentioned in the beginning of this chapter. Also, you should have provided
read_insights extended permission to the application.
How to do it...
The following steps will demonstrate how to get the number of installations of an application:
index.phpand append the following code to it:
- Write a query to retrieve the number of installations of the application:
$results = $facebook->api( array( 'method' => 'fql.query', 'query' =>"SELECT metric,value FROM insights ...