Revision #5 has been created by lucifurious on Jun 12, 2009, 12:47:03 AM with the memo:
Changed code formatting
« previous (#4) next (#6) »
Changes
Title
unchanged
How To Connect With Twitter From Yii
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Content
changed
[...]
```php
// Twitter API
'twitter' => array(
'class' => 'pogostick.components.twitter.CPSTwitterApi',
'apiKey' => '<b>your_consumer_key
</b>',
'apiSecretKey' => '
<b>your_consumer_secret
</b>',
'apiBaseUrl' => 'http://twitter.com',
'callbackUrl' => '
<b>your_callback_url
</b>',
'format' => 'array',
),[...]
```php
if ( Yii::app()->twitter->isAuthorized )
$_arToken = Yii::app()->twitter-><b>getToken()
</b>;
else
echo 'User is not authorized';
```
The token is actually an array with two (or more once authenticated) elements. After authorization, the array contains the following elements:[...]