Question

How can I install Twitter API SSL Root CA Certificate

Posted April 26, 2014 3.6k views
Hi, I'm having issues with my Twitter application on Digital Ocean and I found out (already tried on my local server XAMPP) that I need to install the Root CA Certificate (https://dev.twitter.com/discussions/533). I managed to easily do it on my local server but I can't find out how to do it on my droplet here (I use LAMP on Ubuntu 12.04). Any suggestions? Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers
sudo wget http://curl.haxx.se/ca/cacert.pem -O /usr/lib/ssl/certs/cacert.pem
Ugh, I don't get it. It's not working. On my local server its working like a charm, but on my droplet no. Do you think its related to something on curl?
My code is this one, it returns nothing on $response:

require_once('lib/TwitterAPIExchange.php');
include "config.php";

$url = 'https://api.twitter.com/1.1/search/tweets.json';
$getfield = '?q=porra&result_type=recent&count=100';
$requestMethod = 'GET';
$twitter = new TwitterAPIExchange($settings);

$response = $twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest();

@diego: What is the actual error that you're seeing? Why do you think the problem is with the certificate?
Submit an Answer