[英]Yii2 AuthClient is not working with facebook login
when click on facebook widget it will redirect to this link and give me error page not found 当点击Facebook小部件时,它将重定向到此链接并给我找不到错误页面
siteURl/frontend/web/site/auth?authclient=facebook&code=AQB-buOgEj-2wA1zGkMoW9Xq-i6Rh6IEAQ_V4P1JN3EaVdxJ-EcPThJ3mX61bg2uzpEM1JNGyrrWAXNCFOspAiw0eaaNP6SFF0fe7bun7T_D-flopSJnC-vSWU3PHrqZZETwZQUHNSnIZb_homm8zrhobNJay66lLcWuo7mhrk6_rOLLvCI-XLNbdb6U57loMS8pt0E0IHFdnItzbi2Yxxe75h97xC3boMxlJgQoyXpVBdL7PBLPgTvoW_d_QwySrUxeCmOjYCODo9dbhrTlWJIOtHIIYXQSS8uEu7Ms-dVZYQjWpl4HdV46Wtc190zIeHAXkYxBa_DQlWXL_hMa4KZq#_=_
while in controller I have added action like this 在控制器中我添加了这样的动作
//In actions:
'auth' => [
'class' => 'yii\authclient\AuthAction',
'successCallback' => [$this, 'onAuthSuccess'],
],
and here is the Success function implementation 这是Success函数的实现
public function onAuthSuccess($client)
{
print_r('in'); exit;
$attributes = $client->getUserAttributes();
}
Try to use this: 试着用这个:
http://www.yiiframework.com/wiki/459/integrating-hybridauth-directly-into-yii-without-an-extension http://www.yiiframework.com/wiki/459/integrating-hybridauth-directly-into-yii-without-an-extension
I'll hope this help you 我希望这会对你有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.