How To Use Twitteroauth Using Composer?


I am new to using composer and would like to know how to use TwitterOAuth.

The package has downloaded and installed fine.

    "require": {

        "php": ">=5.3.0",

        "yiisoft/yii": "1.1.13",

        "ruudk/twitter-oauth": "*",

But how do I use it?

In my model I tried

$twitter = new TwitterOAuth\Api(‘2wdfr23’,‘werwq312d’,‘100821168RAKtRtM’, ‘GLkkXppXVGakjk’ );

and I get error


PHP Fatal error:  Class 'TwitterOAuth\Api' not found in 


the autoload_classmap.php has the following entries

'TwitterOAuth\\Api' => $vendorDir . '/ruudk/twitter-oauth/src/TwitterOAuth/Api.php',

    'TwitterOAuth\\OAuth\\Consumer' => $vendorDir . '/ruudk/twitter-oauth/src/TwitterOAuth/OAuth/Consumer.php',

    'TwitterOAuth\\OAuth\\DataStore' => $vendorDir . '/ruudk/twitter-oauth/src/TwitterOAuth/OAuth/DataStore.php',

    'TwitterOAuth\\OAuth\\Exception' => $vendorDir . '/ruudk/twitter-oauth/src/TwitterOAuth/OAuth/Exception.php',