Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/254.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Yii2 LinkedIn身份验证问题_Php_Yii2 - Fatal编程技术网

Php Yii2 LinkedIn身份验证问题

Php Yii2 LinkedIn身份验证问题,php,yii2,Php,Yii2,在我的Yi2项目中,我使用Authclient函数调用Api登录,如Facebook/Google和LinkedIn。 在我的控制器中,我获取属性并将其重定向到我的自定义页面。 我的控制器 public function successCallback($client) { $attributes = $client->getUserAttributes(); $user_email = $attributes['email']; $user_name = $a

在我的Yi2项目中,我使用Authclient函数调用Api登录,如Facebook/Google和LinkedIn。
在我的控制器中,我获取属性并将其重定向到我的自定义页面。
我的控制器

public function successCallback($client)
{
    $attributes = $client->getUserAttributes();
      $user_email = $attributes['email'];
    $user_name = $attributes['name'];
    $user = User::find()->where(['user_email'=>$user_email])->one();
    $count = count($user);
    if ($count == 0 ){
        return $this->redirect(['user/create?email='.$user_email.'&name='.$user_name.'']);
    }else{
        return Yii::$app->user->login($user);

    }
}
Facebook和谷歌工作得很好,但LinkedIn没有检索任何属性。它只提供了一些代码,如AQTq1AlTvyS-3rqGBT5mZE5-Vw4gybfeZ8kK3lBf2UhdSjvrLlokNwnd_vGXEPrlEg8to8KH-AQFYZPLU4YQOBDJHWFSCPD1YRT4Y0Q

public function successCallback($client)
{
    $attributes = $client->getUserAttributes();
      $user_email = $attributes['email'];
    $user_name = $attributes['name'];
    $user = User::find()->where(['user_email'=>$user_email])->one();
    $count = count($user);
    if ($count == 0 ){
        return $this->redirect(['user/create?email='.$user_email.'&name='.$user_name.'']);
    }else{
        return Yii::$app->user->login($user);

    }
}

如何解码此代码以获取用户详细信息。有人能帮我吗?

您是以哪种形式获得代码的?请检查此AQRTnq8dq-qgRe3ecEIxm-ZXHAR0HUUAVJJQ1NYTOPP82FUWHJIJDHKIL-TZT51ucRKUj4GRLuG6LFzCY5KQz\JrqFuylOXBOUKHfQ-CSWKME。这是我得到的