PHPackages                             log1x/socialproof - 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. log1x/socialproof

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

log1x/socialproof
=================

A fluent interface for retrieving follower counts from social API's.

0.1.2(7y ago)401.0k2MITPHPPHP &gt;=7.0

Since Jul 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Log1x/socialproof)[ Packagist](https://packagist.org/packages/log1x/socialproof)[ RSS](/packages/log1x-socialproof/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

SocialProof
===========

[](#socialproof)

[![Latest Stable Version](https://camo.githubusercontent.com/601697f5d862039dc75fdc0759fdc1f3395cda9f708da850a4251d0b13b4ea04/68747470733a2f2f706f7365722e707567782e6f72672f6c6f6731782f736f6369616c70726f6f662f762f737461626c65)](https://packagist.org/packages/log1x/socialproof) [![Total Downloads](https://camo.githubusercontent.com/1c896649d2905ebec61863837c8530740ca3c13e6af4e1d97d65c826d52d664a/68747470733a2f2f706f7365722e707567782e6f72672f6c6f6731782f736f6369616c70726f6f662f646f776e6c6f616473)](https://packagist.org/packages/log1x/socialproof)

What is SocialProof?
--------------------

[](#what-is-socialproof)

SocialProof is a [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface) for fetching followers / fans from various social media platforms using their internal API. It handles all API requests asynchronous using [Guzzle](https://github.com/guzzle/guzzle) and catches API exceptions / errors with a user-definable default value.

Features
--------

[](#features)

- Simple, fluent syntax for handling credentials / configuration.
- Completely asynchronous using Guzzle's `getAsync()`.
- User-definable default values when an API request fails.
- Simple debugging when configuring.
- Automatically handles OAuth when fetching from API's such as Twitter.
- Easily extendable and all PR's are very welcome. ❤️

Current Platforms
-----------------

[](#current-platforms)

- [Facebook](https://developers.facebook.com/)
- [Twitter](https://developer.twitter.com/)
- [Instagram](https://www.instagram.com/developer/)
- [Pinterest](https://developers.pinterest.com/)
- [LinkedIn](https://developer.linkedin.com/)

All pull requests for additional platforms are greatly appreciated. Please use the existing [Providers](https://github.com/Log1x/socialproof/tree/master/src/Providers) as an example.

Requirements
------------

[](#requirements)

- [PHP](https://secure.php.net/manual/en/install.php) &gt;= 7.0
- [Composer](https://getcomposer.org/download/)

Installation
------------

[](#installation)

Install via Composer:

```
composer require log1x/socialproof
```

Usage
-----

[](#usage)

SocialProof is incredibly easy to use, but caching values and storing them appropriately to not hit API limits / affect performance is up to the end-user. For WordPress, an example would be using the [Transients API](https://codex.wordpress.org/Transients_API) with an expiration of every 24 hours and the [Options API](https://codex.wordpress.org/Options_API) for a fallback value along with `->setDefault()` in the event an API request fails after your transient expires.

### Facebook

[](#facebook)

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->facebook()
      ->setUsername('example')
      ->setToken('XXXXXXXXXXXXXXXXXXXXXXXX')
  ->get();
```

See [here](http://tools.creoworx.com/facebook/) to generate a token for Facebook.

### Twitter

[](#twitter)

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->twitter()
      ->setUsername('username')
      ->setConsumerKey('XXXXXXXXXXXXXXXXXXXXXXXX')
      ->setConsumerSecret('XXXXXXXXXXXXXXXXXXXXXXXX')
      ->setToken('XXXXXXXXXXXXXXXXXXXXXXXX')
      ->setTokenSecret('XXXXXXXXXXXXXXXXXXXXXXXX')
  ->get();
```

### Instagram

[](#instagram)

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->instagram()
      ->setToken('XXXXXXXXXXXXXXXXXXXXXXXX')
  ->get();
```

### Pinterest

[](#pinterest)

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->pinterest()
      ->setUsername('username')
  ->get();
```

### LinkedIn

[](#linkedin)

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->linkedin()
      ->setUsername('username')
      ->setToken('XXXXXXXXXXXXXXXXXXXXXXXX')
  ->get();
```

Configuration
-------------

[](#configuration)

`SocialProof::social()` accepts various configuration when passing through your social credentials. Here's an example using Facebook:

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->facebook()
      ->setUsername('example')
      ->setToken('XXXXXXXXXXXXXXXXXXXXXXXX')
      ->setDefault('No followers')
      ->setApi('https://graph.facebook.com')
      ->setEndpoint('/v2.7/')
      ->setTimeout(60)
      ->setDebug()
  ->get();
```

A long form syntax is also available for passing credentials and configuration through an array using `setCredentials($array)` and `setConfigs($array)` or a string using `setCredential($key, $value)` and `setConfig($key, value)`.

```
use SocialProof\SocialProof;

return SocialProof::social()
  ->facebook()
      ->setCredentials([
        'username' => 'example',
        'token' => 'XXXXXXXXXXXXXXXXXXXXXXXX'
      ])
      ->setConfig('default', 'No Followers')
  ->get();
```

Debugging
---------

[](#debugging)

Since SocialProof catches API errors, timeouts, etc. and returns a default value instead, you can use `->setDebug()` to enable debugging during initial setup.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~26 days

Total

3

Last Release

2798d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5745907?v=4)[Brandon](/maintainers/Log1x)[@Log1x](https://github.com/Log1x)

---

Top Contributors

[![Log1x](https://avatars.githubusercontent.com/u/5745907?v=4)](https://github.com/Log1x "Log1x (6 commits)")

---

Tags

fluentfollowersphpsocialsocial-apihelperinterfacewrapperfluentsocial

### Embed Badge

![Health badge](/badges/log1x-socialproof/health.svg)

```
[![Health](https://phpackages.com/badges/log1x-socialproof/health.svg)](https://phpackages.com/packages/log1x-socialproof)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[samrap/acf-fluent

A fluent interface for the Advanced Custom Fields WordPress plugin

28656.0k4](/packages/samrap-acf-fluent)[bocharsky-bw/arrayzy

A native PHP arrays easy manipulation library in OOP way.

38425.4k](/packages/bocharsky-bw-arrayzy)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[pdir/social-feed-bundle

Social feed extension for Contao CMS

1414.8k](/packages/pdir-social-feed-bundle)

PHPackages © 2026

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