The Yii Facebook Connect connect to the facebook.
Extract the [Yii Facebook Connect][1] from archive under protected/extensions [1]: https://github.com/NickSun/Facebook-Connect-Button "Yii Facebook Connect"
For use [Yii Facebook Connect][1] need to add some code to configure to the component section:
<?php
//...
'preload' => array('log','facebookconnect'),
//...
'facebookconnect' => array(
'class' => 'ext.facebookconnect.FacebookConnect',
'appId' => 'YOUR_APP_ID',
'secret' => 'YOUR_APP_SECRET',
)
and you can add it in view section:
<?php
//...
$this->widget('ext.facebookconnect.FacebookConnectButton',
array(
'label' => 'Login with FB',
'template' => '<span>{label}</span>',
'redirect_uri' => CHtml::normalizeUrl(array('/site/index')),
'scope' => array('offline_access', 'publish_stream'),
'display' => 'popup',
'htmlOptions' => array(
'class' => 'fb_auth',
)
)
);