This is a generator for creating stats for our Facebook group.
-
Register Facebook Application
-
Install code
$ git clone git://github.com/wwphp-fb/stats $ cd stats $ composer install
-
Adjust configuration
Add and edit
app/config/parameters.yaml
file according to your settings:$ cp app/config/parameters.yml.dist app/config/parameters.yml
parameters.yml
should look like thisfb_app_id: 123456789012312 fb_app_secret: 9xdlsd93kdcd3jkd fb_access_token: xyz group_id: 2204685680 top_users_count: 10 start_datetime: '2015-07-20 00:00:00' end_datetime: '2015-07-26 23:59:59' last_member_name: 'John Doe' last_blocked_count: 123 new_blocked_count: 321 api_pages: 20
Configuration parameters:
fb_app_id
- id of the Facebook application from step 1. You can get it in the dashboard settings of your Facebook application.fb_app_secret
- secret string of the Facebook application from step 1. You can get it in the dashboard settings of your Facebook application.fb_access_token
- Facebook access token should be copied from your Facebook application Graph Api Explorergroup_id
- Facebook group idtop_users_count
- how many top users should be shown in the generated reportstart_datetime
- start datetime string of the reportend_datetime
- end datetime string of the reportlast_member_name
- you should provide a name of added member from previous generated reportlast_blocked_count
- number of blocked accounts from previous reportnew_blocked_count
- number of blocked accounts on the time of report generationapi_pages
- how many pages should the data collecting include. Large amount of data from the Facebook Graph API gets returned in multiple pages and Facebook group feed is sorted by updated topics. -
Generate report
$ php app/console
This repository is released under the MIT license.