GithubHelp home page GithubHelp logo

stats's Introduction

Stats Generator for Facebook Groups

Latest Version Build Status MIT License Coverage Status Quality Score SensioLabsInsight

PHP application for generating Facebook groups statistics.

Documentation

The Frequently Asked Questions might have an answer to your question.

Read the following chapters for using this application locally:

Quick Usage

  1. Create a new Facebook Application.

  2. Install application with Composer

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

    The componser installation script creates config/parameters.yaml file for your settings. Configuration parameters are described in comments in the parameters.yaml.dist. Provide values for your application, date range and other configuration.

  4. Generate Report

    bin/stats generate

    Insert the user access token generated manually via Graph API explorer.

License and Contributing

This repository is released under the MIT license.

You are welcome to suggest improvements or open a ticket.

stats's People

Contributors

058c37a272bed3464d47f0b01038a16a avatar alsoknownasdrew avatar andyps avatar estim avatar gautsson avatar itsfreddyrb avatar jokosu10 avatar jslirola avatar justthegame avatar kezadias avatar mjurinic avatar natetheriver avatar norvinyecla avatar p0v1n0m avatar palosopko avatar pandicornzombie avatar paraschadha2052 avatar petk avatar ranamahmud avatar robbyoconnor avatar rossiza avatar samsambabadi avatar samundra avatar schlenges avatar scrutinizer-auto-fixer avatar smusmu avatar stodar avatar ststscript avatar tititesouris avatar wolframtheta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stats's Issues

Calculate stats based on the correct time

Currently the stats is calculated based on the user's timezone set. The timezone of the data returned by FB graph API is all in UTC standardized format. So if the user calculating the stats has timezone set to something other than UTCΒ±00:00 the stats calculation is wrong.

TODO: Fix the calculation based on the UTCΒ±00:00 by checking the timezone the local PHP installation uses and adjusting it to base UTC one (UTCΒ±00:00)

using first time

Getting following error
Retrieving members from API page 1
40/40 [============================] 100% 4 secs/4 secs 6.0 MiB

PHP Fatal error: Uncaught Error: Call to a member function getId() on null in C :\xampp\htdocs\one\stats\src\Util\Merger.php:32
Stack trace:
#0 C:\xampp\htdocs\one\stats\src\Collection\CommentCollection.php(25): PhpEarth\ Stats\Util\Merger->getMergedItems('636561533213356')
#1 C:\xampp\htdocs\one\stats\src\Model\User.php(177): PhpEarth\Stats\Collection\ CommentCollection->getMergedCommentsByUserId('636561533213356')
#2 C:\xampp\htdocs\one\stats\vendor\twig\twig\lib\Twig\Extension\Core.php(1595): PhpEarth\Stats\Model\User->getPointsCount()
#3 C:\xampp\htdocs\one\stats\vendor\twig\twig\lib\Twig\Environment.php(378) : ev al()'d code(40): twig_get_attribute(Object(Twig_Environment), Object(Twig_Source ), Object(PhpEarth\Stats\Model\User), 'getPointsCount', Array, 'method')
#4 C:\xampp\htdocs\one\stats\vendor\twig\twig\lib\Twig\Template.php(389): __Twig Template_2c779e2ca0a83267837b29ed17688a9aaacebe558f2c45a8e83c3ff935fac9fc->doDis play(Array, Array)
#5 C:\xampp\htdocs\one\stats\vendor\twig\twig\lib\Twig\Template.php(366): Twig_T emplate in C:\xampp\htdocs\one\stats\src\Util\Merger.php on line 32

Translations

Translation messages for the generated stats report are located in app/translations using the Symfony Translation Component and in the YAML format. Variables in messages are in the format %variable%.

Pluralization for languages with multiple pluralization formats:

  • English and languages with 1 plural format:

    "1 comment|%count% comments"

  • Russian and languages with 2 plural formats - first for 1 item, second for 2 items and third for 3 or more items:

    "1 ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ|%count% коммСнтария|%count% ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠ΅Π²"

  • Slovenian and languages with 3 plural formats - first for 1 item, second for 2 items, third for 3 and 4 items and fourth for 5 or more items:

    "1 komentar|%count% komentarja|%count% komentarji|%count% komentarjev"

  • Add your translation. Every help is welcome.

  • Afrikaans (af_ZA) @rossiza

  • Arabic (ar) @stodar

  • Belarusian (bl) @p0v1n0m

  • Bengali (bn) @icic13

  • Catalan (ca) @wolframtheta

  • Croatian (hr) @mjurinic

  • Czech (cs) @StrnadRichard

  • Dutch (nl) @veloxy

  • French (fr) @I-am-me, @Tititesouris

  • German (de) @michaspiss

  • Hindi (hi) @paraschadha2052

  • Hungarian (hu) @Hunrik

  • Indonesian (id) @justthegame

  • Malay (my) @codegateau

  • Norwegian (nb) @RainoBoy97

  • Polish (pl) @Aylard

  • Portuguese (pt_BR) @igorantun

  • Russian (ru) @p0v1n0m

  • Slovak (sk) @palosopko

  • Spanish (es) @jslirola

  • Swedish (sv) @kajes

  • Tagalog (tl) @norvinyecla

  • Turkish (tr) @bureken

  • Ukrainian (uk) @andyps

Big thanks to all translators!

Add most shared topic

Current calculation could also use the number of post shares. Adding this as a todo item to implement in the near future.

Unsupported get request

In some cases the "unsupported get request" error occurs. TODO: check if some refactoring or limiting the results per fetched API page could help out...

Translations

The stats is a small and simple application written in PHP that generates a welcoming stats report for Facebook groups weekly or otherwise set. There are some translations missing described below.

Basically, the translation messages for the generated stats report are located in the translations using the Symfony Translation Component and in the YAML format. Variables in messages are in the format %variable%.

Pluralization for languages with multiple pluralization formats:

  • English and languages with 1 plural format:

    "1 comment|%count% comments"

  • Russian and languages with 2 plural formats - first for 1 item, second for 2 items and third for 3 or more items:

    "1 ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ|%count% коммСнтария|%count% ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠ΅Π²"

  • Slovenian and languages with 3 plural formats - first for 1 item, second for 2 items, third for 3 and 4 items and fourth for 5 or more items:

    "1 komentar|%count% komentarja|%count% komentarji|%count% komentarjev"

TODO

  • There are missing translations for
    shared_topic: "Most shared topic of the week with 1 share|Most shared topic of the week with %count% shares"
  • Add your translation. Every help is welcome.

Points calculation improvements

Current points calculation is not very worked out yet. Algorithm for calculating most active members of the week should include the following:

  • length of comment/reply
  • number of likes on comment/reply
  • 1 point or less for liking other posts in the group
  • possibility of adding points from stuff members to notable weekly members

Improve comments merging in topic

An improvement of comments merging for points calculation has been suggested. Instead of currently merging only sequential comments maybe add also merging all comments in thread in better way. Best answers appear in only some comments (more lengthy ones), other comments are part of a conversation about the issue more or less.

Issue with generating report

Reported thanks to @djangokillen

Fatal error: Call to a member function getField() on a non-object in /projects/simstats/src/Mapper.php on line 50

Crey/conjurer commit-ref.

"The package "crey/conjurer" is pointing to a commit-ref, this is bad practice and can cause unforeseen issues." is keeping us from Platinum medal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.