PHP code example of sagautam5 / social-share-count

1. Go to this page and download the library: Download sagautam5/social-share-count library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sagautam5 / social-share-count example snippets


use Sagautam5\SocialShareCount\ShareCounter;

$url = 'https://www.example.com';

$facebookShares = ShareCounter::getFacebookShares($url);
echo $facebookShares;

$pinterestShares = ShareCounter::getPinterestShares($url);
echo $pinterestShares;

$redditShares = ShareCounter::getRedditShares($url);
echo $redditShares;
shell script
php artisan config:cache