Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to login with Yii2 through twitter account

I am following the yii2-user guide, and I succeed to login through a facebook account. Now i want to login through a twitter account and my

'consumerKey' => 'h5XFtvRVSxxxxxxxxxxxxx',
'consumerSecret' => 'Zb6lCescDoatl1thwGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',

but when I try to login through twitter I get the following error:

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>

I searched for this error but did not found a suitable solution. This is my login page: enter image description here

like image 377
raxa Avatar asked Dec 05 '25 03:12

raxa


1 Answers

Now I have an answer for my own question.I solved this problem by defining Callback URL while creating api key i take Callback URL as optional due to which i get error.But after defining proper Callback URL its working fine for me.

like image 138
raxa Avatar answered Dec 11 '25 01:12

raxa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!