All Projects → Log1x → Socialproof

Log1x / Socialproof

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

Projects that are alternatives of or similar to Socialproof

Socialify
💞 Socialify your project. 🌐 Share with the world!
Stars: ✭ 750 (+1927.03%)
Mutual labels:  social
Community
General discussion, cross-repo efforts and common information for projects in the community.
Stars: ✭ 24 (-35.14%)
Mutual labels:  social
Hall Of Fame
🏆 Show some love to your contributors! A widget for your repo README. Visual and clean. Refreshes every hour.
Stars: ✭ 911 (+2362.16%)
Mutual labels:  social
Fluentpdo
A PHP SQL query builder using PDO
Stars: ✭ 783 (+2016.22%)
Mutual labels:  fluent
Blazor.fast
A tiny wrapper around Fast and Fluent Web Components to integrate with Blazor and easily use the EditForm components
Stars: ✭ 23 (-37.84%)
Mutual labels:  fluent
Badges4 Readme.md Profile
👩‍💻👨‍💻 Improve your README.md profile with these amazing badges.
Stars: ✭ 929 (+2410.81%)
Mutual labels:  social
Rapid.js
An ORM-like Interface and a Router For Your API Requests
Stars: ✭ 700 (+1791.89%)
Mutual labels:  fluent
Ruby Gem Downloads Badge
Clean and simple gem downloads count badge, courtesy of http://shields.io/. You can checkout the application directly at the following URL:
Stars: ✭ 29 (-21.62%)
Mutual labels:  social
Windowscompositionsamples
Windows Composition Samples the place for getting the latest code samples and demos using Windows.UI.Xaml and Windows.UI.Composition to make beautiful Universal Windows Platform applications.
Stars: ✭ 922 (+2391.89%)
Mutual labels:  fluent
Get Social Social Media Font
Font Based Social Media Icon Set
Stars: ✭ 15 (-59.46%)
Mutual labels:  social
Eth.social
An Ethereum dApp for posting social events.
Stars: ✭ 17 (-54.05%)
Mutual labels:  social
Static Social Buttons
Static Social Buttons for Sharing and Tweeting
Stars: ✭ 18 (-51.35%)
Mutual labels:  social
Fluidvalidator
Validating values with a fluent interfaced class
Stars: ✭ 8 (-78.38%)
Mutual labels:  fluent
Programming Language Subreddits And Their Choice Of Words
How do the different communities talk?
Stars: ✭ 752 (+1932.43%)
Mutual labels:  social
React Awesome Button
React button component. Awesome button is a 3D UI, progress, social and share enabled, animated at 60fps, light weight, performant, production ready react UI button component. 🖥️ 📱
Stars: ✭ 943 (+2448.65%)
Mutual labels:  social
Opensource Socialnetwork
Open Source Social Network (OSSN) is a social networking software written in PHP. It allows you to make a social networking website and helps your members build social relationships, with people who share similar professional or personal interests. It is available in 16 international languages.
Stars: ✭ 710 (+1818.92%)
Mutual labels:  social
Vuepress Plugin Social Share
📣 Social sharing plugin for VuePress
Stars: ✭ 27 (-27.03%)
Mutual labels:  social
Socialight
Get Social Network Share Counts with Vanilla JS
Stars: ✭ 34 (-8.11%)
Mutual labels:  social
Meetup
The monthly ReactBris meetup, sponsored by Outfit, Askable and Rexlabs ❤️
Stars: ✭ 29 (-21.62%)
Mutual labels:  social
Xaml Controls Gallery
This app demonstrates the controls available in WinUI and the Fluent Design System.
Stars: ✭ 882 (+2283.78%)
Mutual labels:  fluent

SocialProof

Latest Stable Version Total Downloads

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. ❤️

Current Platforms

All pull requests for additional platforms are greatly appreciated. Please use the existing Providers as an example.

Requirements

Installation

Install via Composer:

composer require log1x/socialproof

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.

Facebook

use SocialProof\SocialProof;

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

See here to generate a token for Facebook.

Twitter

use SocialProof\SocialProof;

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

Instagram

use SocialProof\SocialProof;

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

Pinterest

use SocialProof\SocialProof;

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

LinkedIn

use SocialProof\SocialProof;

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

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

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].