Parse-sdk-ios-osx: Failed to request authorization token from Twitter

Created on 4 Jul 2018  路  10Comments  路  Source: parse-community/Parse-SDK-iOS-OSX

User can't log in the app with Twitter.

The initialize settings in AppDelegate,

PFTwitterUtils.initialize(withConsumerKey: "CorrectConsumerKey", consumerSecret: "CorrectSecretKey")

This is the simple login code;

      PFTwitterUtils.logIn { (user, error) in
            if error != nil {
                print(error!.localizedDescription)
            } else {
                print(user)
            }
        }

And when I tap the login button, It throws authorization error:
"Failed to request authorization token from Twitter."

It was working well before but not anymore.

What I have done so far,

But didn't work.

I really need help with this issue, thank you. I can provide more information if needed.

All 10 comments

Can you put a breakpoint there in this file and provide the response string?

@flovilmart

screen shot 2018-07-04 at 19 20 04

Can we get the description of the response at least? We know the response doesn鈥檛 contain the token but i鈥檇 Like to see the full response string.

<?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>

Is this what you looking for?

Yes can you try again the resolution in https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1310, because that's exactly what it should be. Did you configure your auth callbacks in the twitter API&

@GokmenAkar I just checked on my side and the resolution in #1310 is correct and valid. I can effectively get valid access tokens when I add the callback URL to this provided value.

capture d ecran le 2018-07-04 a 12 48 50

Also documented here: http://docs.parseplatform.org/ios/guide/#setting-up-twitter

@flovilmart Hello, this is my callbacks on apps.twitter.com

screen shot 2018-07-05 at 09 18 50

I still get the same error.

There is no / in the end of the one indicated

Solved! Thank you a lot!

Was this page helpful?
0 / 5 - 0 ratings