Yii Framework Forum: Open Graph And Facebook Login - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Open Graph And Facebook Login Rate Topic: -----

#1 User is offline   kokoseq 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 08-November 12

Posted 26 April 2013 - 03:03 PM

Hi guys,

I have spend whole day by thinking and trying to find out, how open graph extension works. I need to do a facebook login to my site and can not make it work. Does anyone knows about any functional example? I managed to get the facebook login button to my site, but when I login, Yii::app()->facebook->getUser() still returns 0. There are no errors in Javascript console. I basically tried this:

$this->widget('ext.yii-facebook-opengraph.plugins.LoginButton', array(
   'show_faces'=>false,
	'width' => '200px',
	'scope' => 'email',
	'text' => 'Login via facebook',
	'on_login' => 'window.location.replace(fbUrl);'


fbUrl is url of controller action which looks like this

public function actionFbLogin(){
		echo Yii::app()->facebook->getUser();
		echo $token = Yii::app()->facebook->getAccessToken();
		
	}


It is not a much, I am only testing it, but it does not work anyway. Could anyone pleas help me, tell me what to do? I do can not find out, how it works and I am really desperate.

Cheers, Kokoseq
0

#2 User is offline   Filip Ajdacic 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 27-April 13
  • Location:Belgrade, Serbia

Posted 27 April 2013 - 08:26 AM

Did you properly configured appId and secret ?
0

#3 User is offline   kokoseq 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 08-November 12

Posted 27 April 2013 - 11:55 AM

yes, i did
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users