PHP code example of log1x / socialproof

1. Go to this page and download the library: Download log1x/socialproof 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/ */

    

log1x / socialproof example snippets


use SocialProof\SocialProof;

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

use SocialProof\SocialProof;

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

use SocialProof\SocialProof;

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

use SocialProof\SocialProof;

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

use SocialProof\SocialProof;

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

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();

use SocialProof\SocialProof;

return SocialProof::social()
  ->facebook()
      ->setCredentials([
        'username' => 'example',
        'token' => 'XXXXXXXXXXXXXXXXXXXXXXXX'
      ])
      ->setConfig('default', 'No Followers')
  ->get();