如何通过推特账号登录Yii2
How to login with Yii2 through twitter account
我正在按照 yii2-user 指南进行操作,并且通过
脸书账号。现在我想通过 Twitter 帐户和我的
登录
'consumerKey' => 'h5XFtvRVSxxxxxxxxxxxxx',
'consumerSecret' => 'Zb6lCescDoatl1thwGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
但是当我尝试通过 Twitter 登录时出现以下错误:
Request failed with code: 401, message:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token</request>
</hash>
</xml>
我搜索了这个错误,但没有找到合适的解决方案。这是我的登录页面:
现在我有了自己的答案 question.I 通过定义 Callback URL 解决了这个问题
在创建 api 键时,我将回调 URL 作为可选项,因此在定义正确的 回调 URL 后我得到 error.But 它工作正常对我来说。
我正在按照 yii2-user 指南进行操作,并且通过 脸书账号。现在我想通过 Twitter 帐户和我的
登录'consumerKey' => 'h5XFtvRVSxxxxxxxxxxxxx',
'consumerSecret' => 'Zb6lCescDoatl1thwGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
但是当我尝试通过 Twitter 登录时出现以下错误:
Request failed with code: 401, message:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token</request>
</hash>
</xml>
我搜索了这个错误,但没有找到合适的解决方案。这是我的登录页面:
现在我有了自己的答案 question.I 通过定义 Callback URL 解决了这个问题 在创建 api 键时,我将回调 URL 作为可选项,因此在定义正确的 回调 URL 后我得到 error.But 它工作正常对我来说。