I am including the TwitterOAuth library as suggested on the site here
this is my composer.json
{
"require": {
"opentok/opentok": "2.2.x",
"abraham/twitteroauth": "0.6.*",
"facebook/php-sdk-v4" : "4.0.*"
}
}
in my index.php file in codeigniter I have these lines
require_once './vendor/autoload.php';
use Abraham\TwitterOAuth\TwitterOAuth;
My Facebook library loads fine and everything is working, as is everything else included with composer
however in my controller when I try to post with this
function post()
{
try {
$to = new TwitterOAuth('key', 'secret', 'auth_token', 'auth_token_secret');
$params = array('status' => 'Trial Post');
$do_dm = simplexml_load_string($to->OAuthRequest('http://twitter.com/statuses/update.xml', $params, 'POST'));
}
catch(Exception $o ){
print_r($o);
}
}
I get the error that Class 'TwitterOAuth' not found
I have been digging for a while and don't get how this is not working.. Can anyone help?