PHP wrapper for the Sharedcount.com API.
composer require handelsgids/sharedcount
<?php
require 'vendor/autoload.php';
use Handelsgids\Sharedcount\Sharedcount;
$sharedcount = new Sharedcount('yourapikeygoeshere');
$facebookShares = $sharedcount
->getByUrl('https://www.handelsgids.be')
->getFacebook()
->getShareCount()
;
The above example will output:
5008
Make sure to define whether or not you have a free or paid subscription.
The default is free. Use the following line to set a paying subscription.
$sharedcount = new Sharedcount('yourapikeygoeshere', Sharedcount::SUBSCRIPTION_PAYING);
Set your Sharedcount API key in phpunit.xml and run composer test
.
Handelsgids Sharedcount PHP Wrapper is open-sourced software licensed under the MIT license.