Download the PHP package log1x/socialproof without Composer
On this page you can find all versions of the php package log1x/socialproof. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package socialproof
SocialProof
What is SocialProof?
SocialProof is a fluent interface for fetching followers / fans from various social media platforms using their internal API. It handles all API requests asynchronous using Guzzle and catches API exceptions / errors with a user-definable default value.
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. :heart:
Current Platforms
All pull requests for additional platforms are greatly appreciated. Please use the existing Providers as an example.
Requirements
Installation
Install via Composer:
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 with an expiration of every 24 hours and the Options API for a fallback value along with ->setDefault()
in the event an API request fails after your transient expires.
See here to generate a token for Facebook.
Configuration
SocialProof::social()
accepts various configuration when passing through your social credentials. Here's an example using Facebook:
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)
.
Debugging
Since SocialProof catches API errors, timeouts, etc. and returns a default value instead, you can use ->setDebug()
to enable debugging during initial setup.
All versions of socialproof with dependencies
guzzlehttp/guzzle Version ^6.3
guzzlehttp/oauth-subscriber Version ^0.3.0