PHP code example of mtougeron / klout-sdk-php

1. Go to this page and download the library: Download mtougeron/klout-sdk-php 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/ */

    

mtougeron / klout-sdk-php example snippets


use Klout\Klout;
$klout = new Klout('<your Klout API license key');

$user = $klout->getUserByTwitterUsername('mtougeron');

echo $user->getNickname() . '\'s Klout score is ' . round($user->getScore()->getScore());
// outputs: mtougeron's Klout score is 49