Answer the question
In order to leave comments, you need to log in
Yii - how to fix error in ext.Eauth when authenticating with facebook?
Hello.
When authorizing through facebook, after the user has entered his data, it gives an error
Undefined property: stdClass::$link
, what could be the problem?
controller
$service = Yii::app()->request->getQuery('service');
if (isset($service)) {
$authIdentity = Yii::app()->eauth->getIdentity($service);
$authIdentity->redirectUrl = Yii::app()->user->returnUrl;
$authIdentity->cancelUrl = $this->createAbsoluteUrl('register/Viewregister');
//var_dump($authIdentity->isAuthenticated);
if ($authIdentity->authenticate()) {
var_dump=$authIdentity->getAttribute('name');
$this->redirect(array('register/Viewregister'));
}
// Что-то пошло не так, перенаправляем на страницу входа
$this->redirect(array('register/Viewregister'));
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question