Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Callback URL not approved for this client application. in Android-Firebase-TwitterLogin

I am trying firebase twitter login in android app and it gives this error.

E/Twitter: Invalid json: <?xml version="1.0" encoding="UTF-8"?><errors><error code="415">Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings</error></errors>

If firebase and app.twitter callback url are the same, it gives this error. If i change callback url it works but this time I don't see authentication info(user email etc.) in firebase console. I need to use https://appname.firebaseapp.com/__/auth/handler this on app.twitter for auth but it gives error. Any solution thanks in advance.

like image 246
wowo Avatar asked Jul 05 '18 20:07

wowo


2 Answers

Latest solution

Just add twittersdk:// as one callback URL on your twitter app setting https://apps.twitter.com/ and it will work as a magic.

like image 86
MRizwan33 Avatar answered Sep 21 '22 06:09

MRizwan33


Most oauth providers require the redirect uri (which I suppose is the callback url here) to be predefined, for safety reasons. You say if you change it, you don’t get this error, but you don’t mention what the change is that you’re making. Either way, I think you answered your own question, you should change it and then work out why your next problem with user info is occurring, which is at a later stage in the oauth process.

like image 32
Sebastiaan van den Broek Avatar answered Sep 19 '22 06:09

Sebastiaan van den Broek