Cwebapplication Not Define.

Hi all.

I am doing a project and try to implement facebook login to my login page. I had follow the tutorial in HERE. But when i run the code


<?php Yii::app()->eauth->renderWidget(); ?>

it showed "CException - Property "CWebApplication.eauth" is not defined".

Can anyone please tell me which part I miss out or did it incorrectly?

Below is my config/main.php


<?php


// uncomment the following to define a path alias

// Yii::setPathOfAlias('local','path/to/local-folder');


// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

	'name'=>'My Web Application',


	// preloading 'log' component

	'preload'=>array('log'),


	// autoloading model and component classes

	'import'=>array(

		'application.models.*',

		'application.components.*',

		'application.extensions.eoauth.*',

		'application.extensions.eoauth.lib.*',

		'application.extensions.lightopenid.*',

		'application.extensions.eauth.*',

		'application.extensions.eauth.services.*',

	),


	'modules'=>array(

		// uncomment the following to enable the Gii tool

		

		'gii'=>array(

			'class'=>'system.gii.GiiModule',

			'password'=>'123',

		 	// If removed, Gii defaults to localhost only. Edit carefully to taste.

			'ipFilters'=>array('127.0.0.1','::1'),

		),

		/**/

	),


	// application components

	'components'=>array(

		'user'=>array(

			// enable cookie-based authentication

			'allowAutoLogin'=>true,

		),

		'Loid' => array (

			 'class' => 'application.extensions.lightopenid.loid' ,

		),

		'Eauth' => array (

			 'class' => 'application.extensions.eauth.EAuth' ,

			 'Popup' => true , // Use the Popup window INSTEAD of Redirecting. 

			'Services' => array ( //You CAN Change the Their classes and providers. 

				'Facebook' => array (

					 'class' => 'FacebookOAuthService' ,

					 'client_id' => '559551260728497' ,

					 'client_secret' => '6e1d59ab11582b0ffdb1c635f2fb84ca' ,

				),

			),

		),


		// uncomment the following to enable URLs in path-format

		/*

		'urlManager'=>array(

			'urlFormat'=>'path',

			'rules'=>array(

				'<controller:\w+>/<id:\d+>'=>'<controller>/view',

				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

		),

		*/

		/*'db'=>array(

			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',

		),*/

		// uncomment the following to use a MySQL database

		

		'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=test',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => '',

			'charset' => 'utf8',

		),

		

		

		'session' => array(

           'autoStart'=>true,  

			),

   

		'errorHandler'=>array(

			// use 'site/error' action to display errors

            'errorAction'=>'site/error',

        ),

		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning',

				),

				// uncomment the following to show log messages on web pages

				/*

				array(

					'class'=>'CWebLogRoute',

				),

				*/

			),

		),

	),


	// application-level parameters that can be accessed

	// using Yii::app()->params['paramName']

	'params'=>array(

		// this is used in contact page

		'adminEmail'=>'webmaster@example.com',

	),

	

);



I had solved the issue. It is better to follow the tutorial at Here