I want to implement Twitter connection in my app and followed
http://www.yiiframew...itter-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?
Page 1 of 1
Twitter Connection problem
#2
Posted 13 August 2012 - 03:15 PM
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:
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',
),
#3
Posted 13 August 2012 - 09:21 PM
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');
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');
Share this topic:
Page 1 of 1

Help











