Search code examples
phptwitterweb-crawlertwitter-oauthdatumbox

ERROR WHILE CRAWL Datumbox Twitter Sentiment Analysis using php


I'm trying for Datumbox Twitter Sentiment Analysis using php for that i have used the code from here

http://blog.datumbox.com/how-to-build-your-own-twitter-sentiment-analysis-tool/

but it shows error like this , Even i filled my keys in config.php

Fatal error: Uncaught exception 'TwitterApiException' with message 'Operation timed out after 5015 milliseconds with 0 bytes received' in C:\xampp\htdocs\test\twitter\lib\twitter-client.php:423 Stack trace: #0 C:\xampp\htdocs\test\twitter\lib\twitter-client.php(349): TwitterApiClient::http_request('https://api.twi...', Array) #1 C:\xampp\htdocs\test\twitter\lib\twitter-client.php(239): TwitterApiClient->rest_request('search/tweets', Array, 'GET') #2 C:\xampp\htdocs\test\twitter\lib\TwitterSentimentAnalysis.php(56): TwitterApiClient->call('search/tweets', Array, 'GET') #3 C:\xampp\htdocs\test\twitter\lib\TwitterSentimentAnalysis.php(40): TwitterSentimentAnalysis->getTweets(Array) #4 C:\xampp\htdocs\test\twitter\index.php(31): TwitterSentimentAnalysis->sentimentAnalysis(Array) #5 {main} thrown in C:\xampp\htdocs\test\twitter\lib\twitter-client.php on line 423

is there any problem with my side or in the code?


Solution

  • It seems to me that the Twitter API client can’t access the certificate. Make sure it is on the right place and that it has read privileges.