PHP HybridAuth身份验证失败 - 错误的重定向

时间:2013-12-20 10:58:12

标签: php yii facebook-login hybridauth hybridauthprovider

我正在使用HybridAuth Yii扩展程序通过Facebook等登录。但我想这不是一个Yii问题,所以普通的PHP开发人员也可以帮助我。 如果我取消连接,我将被重定向到一个页面,其中只显示以下错误:

Authentication failed. The user has canceled the authentication or the provider refused the connection.

Original error message: Authentication failed! The user denied your request.

Trace:
#0 /var/www/dev/protected/extensions/widgets/hybridAuth/vendors/hybridauth/Hybrid/Auth.php(39): Hybrid_Auth::initialize(Array)
#1 /var/www/dev/protected/extensions/widgets/hybridAuth/CHybridAuth.php(70): Hybrid_Auth->__construct(Array)
#2 /var/www/dev/protected/extensions/widgets/hybridAuth/CHybridAuth.php(80): CHybridAuth->getHybridAuth()
#3 /var/www/dev/protected/extensions/widgets/hybridAuth/CHybridAuth.php(155): CHybridAuth->getAdapter('Facebook')
#4 /var/www/dev/protected/controllers/HybridauthController.php(21): CHybridAuth->isAdapterUserConnected('Facebook')
#5 [internal function]: HybridauthController->actionAuthenticate('Facebook')
#6 /var/www/dev/yii/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(Object(HybridauthController), Array)
#7 /var/www/dev/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(HybridauthController), Object(ReflectionMethod), Array)
#8 /var/www/dev/yii/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#9 /var/www/dev/yii/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#10 /var/www/dev/yii/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#11 /var/www/dev/yii/framework/web/CWebApplication.php(282): CController->run('authenticate')
#12 /var/www/dev/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('hybridauth/auth...')
#13 /var/www/dev/yii/framework/base/CApplication.php(180): CWebApplication->processRequest()
#14 /var/www/dev/index.php(13): CApplication->run()
#15 {main}


Fatal error: Call to a member function isUserConnected() on a non-object

我已经尝试禁用Facebook沙盒模式以及尝试在Facebook开发者页面上找到“取消”重定向网址,但它仍然无效。
是否有可能重定向到我的应用程序主页URL或类似的东西?

1 个答案:

答案 0 :(得分:0)

你可以找到最接近"取消"重定向是"取消授权回拨URL",您可以在应用程序下的Facebook开发者页面上的Settings -> Advanced -> Deauthorize Callback URL下进行设置。