This is a generator for creating stats for our Facebook group.
How are points calculated?
- Each post, each comment and each reply to a comment in the group gets you one point.
- Number of likes of your topic, comment or reply gets you extra points:
- 1 to 10 likes = 1 point
- 11 to 20 likes = 2 points
- 21 to 30 likes = 3 points
- and so on until 91 to 100 likes = 10 points
- more than 100 likes gets you 11 points
- More detailed comments or replies with 100 characters or more get you extra points.
What is the benefit of the points?
We could never possibly thank properly enough for contributions from members in this group. This group is all about open source spirit and helping others. These points will help you check your contribution activity in our group compared to other members and bring some fun in PHP back. Leetness in the universe is also not excluded for getting higher score than other members :)
If you want to install this application locally, do the following:
-
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.yamlfile according to your settings:$ cp app/config/parameters.yml.dist app/config/parameters.yml
parameters.ymlshould 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 top_topics: - title: "20 years of PHP" url: "fb.com/groups/2204685680/permalink/10153439277470681"
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.top_topics:- array of staff picked topics -
Run tests:
$ phpunit -c app/
-
Generate report
$ php app/console
This repository is released under the MIT license.