Twitter Connection problem

I want to implement Twitter connection in my app and followed

http://www.yiiframework.com/wiki/35/how-to-connect-with-twitter-from-yii/

When I tried to access to views/site/twitter.php, Yii::app()->twitter->isAuthorized was executed, and caused an error (CException).

Alias "pogostick.components.twitter.CPSTwitterApi" is invalid. Make sure it points to an existing PHP file.

I installed the pogostick Yii Extensions library under protected/extensions. There exists a file protected/extensions/pogostick/components/twitter/CPSTwitterApi.php

What’s wrong?

I was getting the same error, maybe this is an old post but it can help somebody that is facing the same problem.

I solve this by putting "ext." before "pogostick.components.twitter.CPSTwitterApi" like this: ext.pogostick.components.twitter.CPSTwitterApi in the main.php at config when you declare the class for the component. It should be like this:


//  Twitter API

'twitter' => array(

    'class' => 'ext.pogostick.components.twitter.CPSTwitterApi',

    'apiKey' => 'your_consumer_key',

    'apiSecretKey' => 'your_consumer_secret',

    'apiBaseUrl' => 'http://twitter.com',

    'callbackUrl' => 'your_callback_url',

    'format' => 'array',

),

Thank you Dominus,

CPSTwitterApi is found. But I had another error:

include(CPSOAuthComponent.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

CPSOAuthComponent is a super class of CPSTwitterApi. autoload in YiiBase.php generates this error. Alias is set in config/main.php as follows:

Yii::setPathOfAlias(‘pogostick’,‘protected/extensions/pogostick’);