2017 © Pedro Peláez
 

library soshare

URL shares

image

belt/soshare

URL shares

  • Sunday, October 26, 2014
  • by belt
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Belt.Soshare

Software License Build Status Coverage Status Quality Score, (*1)

Shared URLs, (*2)

Belt.Soshare is an utility library that allows you to easily check the number of shares an URL has for a given social network (or all social networks)., (*3)

Supported networks:, (*4)

  • Twitter
  • Facebook
  • LinkedIn
  • reddit
  • Pinterest
  • StumbleUpon

Installation

Via Composer., (*5)

$ composer require belt/soshare

Usage

Usage is really simple (as usual)., (*6)

use Belt\Soshare;
use Belt\Soshare\Reddit;
use Belt\Soshare\Twitter;
use Belt\Soshare\Facebook;
use Belt\Soshare\LinkedIn;
use Belt\Soshare\Pinterest;
use Belt\Soshare\StumbleUpon;

$soshare = new Soshare();
$soshare->addNetwork(new Reddit());
$soshare->addNetwork(new Twitter());
$soshare->addNetwork(new Facebook());
$soshare->addNetwork(new LinkedIn());
$soshare->addNetwork(new Pinterest());
$soshare->addNetwork(new StumbleUpon());

$soshare->getShares('http://apple.com');
$soshare->getShares('http://apple.com', ['twitter']); // Only get shares on Twitter
$soshare->getShares('http://apple.com', ['facebook', 'reddit']); // Only get shares on Facebook and Reddit

$soshare->getSharesByNetwork('http://apple.com'); // Get the shares seperated by network
// => [ 'twitter' => 32, 'facebook' => 1337, ... ]

Contributing

Please see CONTRIBUTING., (*7)

Credits

This library is based on social-shares for Ruby. If you're building something in Ruby and you need functionality like this, I recommend you check this library out!, (*8)

License

Please see LICENSE., (*9)

The Versions

26/10 2014

dev-master

9999999-dev https://github.com/beltphp/soshare

URL shares

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

social url facebook twitter linkedin sharing