PHP code example of iiiicaro / sentiment-thermometer
1. Go to this page and download the library: Download iiiicaro/sentiment-thermometer 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/ */
iiiicaro / sentiment-thermometer example snippets
iiicaro\SentimentThermometer\SentimentThermometer;
$config = [
'twitter' => [
'consumer_key' => 'CONSUMER_KEY_HERE',
'consumer_secret' => 'CONSUMER_SECRET_HERE',
]
];
$sentimentThermometer = new SentimentThermometer($config);
$thermomether = $sentimentThermometer->get('Donald Trump');
print_r($thermomether);