Twitter Callback Error

Using the easyTwitterLoginWithFieldsMapping function, I am logging in users in my app. I followed the steps for configuring the developer’s side on Twitter, including the callback URL of https://api.backendless.com. When I run the app, it takes me to the twitter api to login, but when I log in, as the app tries to take me to the callback URL, I get an error of “Cannot Open Page” saying “Safari cannot open the page because the address is invalid.” I am receiving the print message denoting a logged in user, but the app is stopping at the error alert on the twitter api page. Is there something that I am missing so that the twitter api just sends me back to the app?

When I say that the print message is denoting a logged in user, what I actually mean is that the following code prints “result: 1” after running, however, the app never gets to the application function in AppDelegate.swift that handles the actual user login:

func easyTwitterLogin() {









        

        backendless.userService.easyLoginWithTwitterFieldsMapping(["email":"email"],

            response: {(result : AnyObject!) -> () in

                print ("result: \(result)")

            },

            error: { (fault : Fault!) -> () in

                print("Server reported an error: \(fault)")

        })

    }

Hi Warren,

This has been assigned to a developer to look into. He will be following up with you shortly.

Regards,
Mark

Thanks Mark. I will await his reply.

Hi Warren,

You should set the URL Types → URL Schemes in your Info.plist :
http://support.backendless.com/public/attachments/362b6151bdb2242d7f8eb82620b9b663.png</img>

But you should set YOUR AppId after ‘backendless’.

Regards,
Slava

You could investigate UserService documentation and follow its recommendation.

I see it now. It was hidden in the Easy Facebook Login setup instructions, but isn’t mentioned or referenced inside the Easy Twitter Login instructions.

Thank you for your help!