1

I am trying to get examples to work using https://github.com/ricardoper/TwitterOAuth

and here is what i get:

Notice: Use of undefined constant CURLOPT_URL - assumed 'CURLOPT_URL' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 448

Notice: Use of undefined constant CURLOPT_HEADER - assumed 'CURLOPT_HEADER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 449

Notice: Use of undefined constant CURLOPT_HTTPHEADER - assumed 'CURLOPT_HTTPHEADER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 450

Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 451

Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 452

Fatal error: Call to undefined function TwitterOAuth\curl_init() in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 460

did I miss some libraries here?

justyy
  • 5,831
  • 4
  • 40
  • 73
  • Did you compile PHP `--with-curl[=DIR]`. Gotta have curl compiled in. http://php.net/manual/en/book.curl.php – Jonathan M Sep 16 '14 at 14:50

1 Answers1

8

The problem is that the php5-curl is not installed. so following the steps should solve the problem.

sudo apt-get install php5-curl
sudo service apache2 restart
justyy
  • 5,831
  • 4
  • 40
  • 73