favorite-tweets Yii extension for display favorite tweets in a beautiful CSS3 interface.

  1. Requirements
  2. Installation
  3. Usage
  4. Twitter API Keys
  5. Usual parameters to be adjusted
  6. Resources
  7. More Extension

Yii extension for display favorite tweets in a beautiful CSS3 interface. It will use Twitter’s v1.1 OAuth API and the Codebird library.


Tested with Yii 1.1.14

Twitter API keys -

  1. Consumer key
  2. Consumer secret
  3. Access token
  4. Token secret


  • Download the latest release package
  • Unpack it in /protected/extensions/ folder


Paste the code into your main.php page or also you can use this code as per your requirement on any page.

$this->widget('application.extensions.favtweets.favtweets', array(
		       'show_tweet'=>'2', //show nos. of tweets
	           'show_border'=>'true',  //show box border: true, false
               'tweets' => array(
			      'twitter_consumer_key'=>'Your consumer key here',
			      'twitter_consumer_secret'=>'Your consumer secret here',
			      'twitter_access_token'=>'Your access token here',
			      'twitter_token_secret'=>'Your access token secret',

Note - Please first provide all valid keys, before implement this extension, Don't write blank.

Twitter API Keys

All requests to the twitter API have to be signed with API keys. The only way to obtain them is to create an application from Twitter’s developers’ site. Follow these steps:

  • Go to https://dev.twitter.com and login with your twitter username and password.
  • Click the “Create new application” button on the top-right.
  • Fill in the required fields and click “Create”. After the app is created, it will have a read-only access, which is perfectly fine in our case.
  • On the application page, click the “Create my access token”. This will allow the app to read data from your account as if it was you (read only). This is required by some of the API endpoints.

This will give you access tokens, client secrets and other keys.

Usual parameters to be adjusted

  • tweets: Show numbers of tweets (show_tweet: 2)
  • border: Show box border (show_border: true, false)
  • cache: tweets cache file create in /assets/ folder, Use the cache if it exists and is less than one hour old. If your tweets not update please remove file - tweets.cache from assets folder.


More Extension

visit - yiiexpert.github.io

0 0
Yii Version: 1.1
License: BSD-2-Clause
Category: Web Service
Developed by: Rohit Suthar
Created on: Jul 11, 2014
Last updated: 9 years ago


show all

Related Extensions