I’m trying to install Abraham’s twitteroauth library without using FOSTwitterBundle. I want to use the API directly through the library.
My problem is that the library has no namespace assigned.
I tried to follow this tutorial and arrived to this configuration:
# app/autoload.php
$loader->registerPrefixes(array(
// ...
'TwitterOAuth_' => __DIR__.'/../vendor/twitteroauth/lib',
));
# vendor/twitteroauth/lib/TwitterOAuth/TwitterOAuth_TwitterOAuth.php
require_once __DIR__.'/src/twitteroauth/twitteroauth.php';
class TwitterOAuth_TwitterOAuth extends TwitterOAuth
{
}
In my controller:
$api = new \TwitterOAuth_TwitterOAuth('asd','asd');
And I still get:
Fatal error: Class 'TwitterOAuth_TwitterOAuth' not found.
Thanks!
I think your path to the lib is wrong.
According to the link you gave, Geshi is :
For:
So you should use:
instead of