3

when click on facebook widget it will redirect to this link and give me error page not found

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

public function onAuthSuccess($client)
{
    print_r('in'); exit;
    $attributes = $client->getUserAttributes();


}
naCheex
  • 1,131
  • 3
  • 14
  • 34

1 Answers1

4

Try to use this:

http://www.yiiframework.com/wiki/459/integrating-hybridauth-directly-into-yii-without-an-extension

I'll hope this help you

Smudoo
  • 562
  • 3
  • 11
  • Yes I know but I need to solve this problem with authClient – naCheex Aug 12 '15 at 12:55
  • Maybe this one?: http://www.mushtaqtahir.com/blog/2/facebook-authentication-using-yii2-authclient – Smudoo Aug 12 '15 at 12:58
  • @smudoo I have just followed the link but its opening the same login window again also have posted it as question. May be you can take a look here http://stackoverflow.com/questions/35550541/yii2-framework-facebook-and-google-login-using-authclient-not-working – indianwebdevil Feb 23 '16 at 04:36