Closed nyambana closed 10 years ago
same here!
I very occasionally get error 0 when accessing a timeline of tweets, I tried echoing the headers received but they were empty too. I cannot replicate this way though...
Hi guys,
looks like, it's not really related to tmhoauth. we had the following problem:
called via apache, everything was fine. called via command line (php-cli), the curl call produced the following error:
"SSL peer certificate or SSH remote key was not OK"
so we a) updated, as described in the tmhoauth readme the cacert bundle and b) double checked our server config. after modifying some parts (we really don't know which) error code 0 seems to be fixed.
i always get error 0 when i trying this code
<?php // Load the app's keys into memory include 'tmhOAuth.php';
// Create an OAuth connection to the Twitter API $tmhOAuth = new tmhOAuth (array( 'consumer_key' => 'xxxxxxxxx',
'consumer_secret' => 'xxxxxx',
'token' => 'xxxxxxxxxx',
'secret' => 'xxxxxxxxx' ));
// Send a tweet $responce = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update.json'),array( 'status' => 'Hello Twitter' ));
// A response code of 200 is a success if ($responce == 200) { echo "Tweet sent"; } else { echo "Error: $responce"; }
?>