[英]How to login with Yii2 through twitter account
我正在關注yii2用戶指南,我成功通過Facebook帳戶登錄。 現在我想通過推特賬號和我的賬戶登錄
'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>
現在我對自己的問題有一個答案。我通過在創建api密鑰時定義回調URL解決了這個問題,我將Callback URL作為可選,因為我得到了錯誤。但是在定義了正確的回調URL后,它對我來說工作正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.