-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Authorization Failure #1
Comments
Eveything is there, i have tested it just by pulling this rep, switching the keys and running, and it worked perfectly... I'll try to recreate that error tonight and possibly help. |
I'm trying to diagnose it, I've debugged the factory calls and everything goes through, the keys are in place. I'll check to make sure they're correct tonight. I'll pull this repo now and use my keys and see if my keys work correctly. Thanks. This solution is one of the simplest I've found with Twitter 1.1 API. |
I downloaded the repo, put my keys in the services variables and built the .apk. Installed and that's the errors when using chrome://inspect in the console. I'll work on it for a little bit longer and see what I can find. I'm trying to pause it to debug why the token isn't available in the call. I'll move the call to a button click and see if I can find something useful to you. |
Somewhere authorization and access_token are null. Stepping through it now to see if I can wrap my head around the Oauth process they have. |
I've been testing it with POSTMAN to see what's off. I think the 'grant_type=client_credentials' is not being sent in the request correctly. When testing the request in POSTMAN, I had to select the 'x-www-form-urlencoded' option for the 'grant_type=client_credentials' then the token is returned. If I try passing as 'form-data' it returns code 170 from Twitter api : 'Missing required parameter: 'grant_type' |
Yeah, thats why there is 'application/x-www-form-urlencoded' in post method on line 138. It doesn't work without that. I did some tests to try and produce the exact same output but was unable... so to clear some possibilites i have made a test acc on twitter that is working for me, so ill email you the keys to test out. Im interested in how it goes... |
Oh man it's the f*****g new cordova version :), i forgot about this.... and i had and older version installed on this system... For quick test u need to and this meta tag to index.html Hope it helps. |
haha I have the plugin already, I just don't have the meta tag. I'll add it and give it a try later on. Thanks! |
I followed this code and I can't determine why the authorization is failing.
![twitauth](https://cloud.githubusercontent.com/assets/6006148/8145127/f08d8f70-11c0-11e5-96cf-80e66c028250.JPG)
I have the correct keys in place and running on an actual device. Is there anything you might have left out of the docs or config?
The text was updated successfully, but these errors were encountered: