Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Latest commit

 

History

History
77 lines (46 loc) · 2.1 KB

installation.md

File metadata and controls

77 lines (46 loc) · 2.1 KB

Installation

Local installation of this application consists of the following steps:

Facebook Application

Create a new Facebook Application in developers.facebook.com from the My Apps menu:

Facebook Application

For this script to work, the default settings will do:

Facebook Application Dashboard

Composer

Install the code with Composer:

git clone git://github.com/php-earth/stats
cd stats
composer install

Configuration

The Composer installation script creates app/config/parameters.yaml file by asking for configuration parameter values. Configuration parameters are described in comments in the parameters.yaml.dist. Provide ID and secret code for your Facebook application, default Graph API version and other configuration. Configuration is explained in more details in the configuration chapter.

Generate Report

Run the report generation:

bin/stats generate --from=2016-09-05 --to=2016-09-11

Before generation starts, you must also provide the user access token manually.

You must provide an access token.

Enter user access token from the Graph API Explorer
https://developers.facebook.com/tools/explorer

To generate the user access token, use Graph API explorer and select the application created in step 1.

User Access Token

The only permission required for the application to work is the user_managed_groups.

Permissions

Docker

If you use Docker you can run this application with the PHP Docker image:

docker run --rm -it -v "$(which composer)":/usr/bin/composer -v "$(pwd)":/usr/src/stats -w /usr/src/stats phpearth/php composer install
docker run --rm -it --name stats -v "$(pwd)":/usr/src/stats -w /usr/src/stats phpearth/php bin/stats generate --from=2017-04-17 --to=2017-04-24