PHPackages                             intracto/socialstats-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. intracto/socialstats-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

intracto/socialstats-bundle
===========================

This bundle provides a way to keep track of your social media accounts with Symfony2

012PHP

Since May 12Pushed 11y ago32 watchersCompare

[ Source](https://github.com/Intracto/SocialStatsBundle)[ Packagist](https://packagist.org/packages/intracto/socialstats-bundle)[ RSS](/packages/intracto-socialstats-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SocialStatsBundle
=================

[](#socialstatsbundle)

\##Installation Load the bundle in app/AppKernel.php

```
public function registerBundles()
    {
        $bundles = array(
			...

            new SocialStatsBundle\SocialStatsBundle()
        );
     ....

```

Run composer update or install to make sure you have all necessary vendors installed.

Update your doctrine schema

```
php app/console doctrine:schema:update --force

```

You are now ready to configure the bundle.

\##Bundle configuration The following is required in your config.yml file.

```
social_stats:
    twitter:
        api_key: %social_stats.twitter.api_key%
        api_secret: %social_stats.twitter.api_secret%
        access_token: %social_stats.twitter.access_token%
        access_token_secret: %social_stats.twitter.access_token_secret%
        owner_id: %social_stats.twitter.api_owner_id%
    facebook:
        app_id: %social_stats.facebook.app_id%
        api_secret: %social_stats.facebook.api_secret%

```

You need to specify your Facebook pages and Twitter names in the parameters.yml file. Your API authentication info goes here too.

```
    social_stats.twitter.api_key: "EDIT ME"
    social_stats.twitter.api_secret: "EDIT ME"
    social_stats.twitter.access_token: "EDIT ME"
    social_stats.twitter.access_token_secret: "EDIT ME"
    social_stats.twitter.api_owner_id: "1234567890"
    social_stats.twitter.usernames:
        - "Intracto"
        - "..."

    social_stats.facebook.app_id: "123456789012345"
    social_stats.facebook.api_secret: "EDIT ME"
    social_stats.facebook.pages:
        - "intracto"
        - "..."

```

\##Data structure

Every log has following properties.

PropertyDescriptionIDA unique identifierTimestampA datetime fieldSourceSource of data. E.g. FacebookAccountAccount of which we logged data. E.g. IntractoTypeType of data we logged E.g. likesContentActual data. E.g. 15695\##Logging social media

Set up a cron job to execute these commands from the Symfony console. You can choose how often you log, but every 12 hours is recommended.

```
php app/console socialstats:log:facebook:page-likes-count
php app/console socialstats:log:twitter:follower-count

```

These commands will use the usernames or pagenames set up in your parameters.yml file, so make sure these are correct.

\##Generating dummy data When you have set up a few usernames or pagenames, you can create some dummy data to check out the functionality of this bundle. You do this by executing following command.

```
php app/console socialstats:generator:log-dummy-data

```

This will generate dummy data logs, for each account specified in parameters.yml. 100 logs will be created for each type (Likes, Follower count) of each social network (Facebook and Twitter).

```
php app/console socialstats:generator:log-dummy-data --quantity=50 Twitter

```

You can change the quantity and the social network (a.k.a. source) as you desire.

\*\* Keep in mind that the command will not generate 50 logs in total. \*\*

It will generate 50 logs for each username/page of all the logging types available for the source type.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/57f44cb52273c29c230dbd1e9ef080402d53eaebcdd1fafbf5c6b75527b40199?d=identicon)[tvlooy](/maintainers/tvlooy)

![](https://www.gravatar.com/avatar/80809e7caf8341b1bac3d759e2b159a38b9bdab2deee5b0d4d66de6c83b992d1?d=identicon)[IntractoSupport](/maintainers/IntractoSupport)

### Embed Badge

![Health badge](/badges/intracto-socialstats-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/intracto-socialstats-bundle/health.svg)](https://phpackages.com/packages/intracto-socialstats-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
