Codebird doesn't work?


#1

Hi everybody

I’m trying to post a simple text on Twitter now for a while, but it doesn’t work.
I did exactly the steps of this tutorial, but it doesn’t work… Can anyone help me please?

Code:

<?php // require codebird require_once('codebird.php'); //for testing the import echo $test_import; \Codebird\Codebird::setConsumerKey("myConsumerKey", "myConsumerSecret"); $cb = \Codebird\Codebird::getInstance(); $cb->setToken("MyAccessToken", "MyAccessTokenSecret"); $params = array( 'status' => 'Auto Post on Twitter with PHP http://goo.gl/OZHaQD #php #twitter' ); $reply = $cb->statuses_update($params); ?>

I have:
Ubunutu (on VMWare) 14.04
PHP 5.5.9

All files (codebird.php, cacert.pem and the file above) are in the same directory.

PS: The import of codebird.php works.


#2

Are you getting any errors? What Codebird version are you using?