S
S
Sergey Okhonko2015-11-22 17:50:06
Yii
Sergey Okhonko, 2015-11-22 17:50:06

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

1 answer(s)
N
Nikita Ignatenkov, 2016-01-17
@kiting

Did you find the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question