Twitter login

Hi guys,

Following this post http://support.backendless.com/t/no-twitter-user-data-mapped Sergey created an internal ticket with the id BKNDLSS-12336 . I really need to know what’s the status on this as I need the Twitter login functionality asap. Please let me know where we are. Thanks.

Hi, any update on this?

Hi Cristian,

We do our best to solve this issue as soon as possible.

Regards,

Denys

Thank you!

Hi Cristian!
Could you try to fix error “Safari cannot open the page because the address is invalid”

using following steps:
http://support.backendless.com/t/twitter-callback-error
“Could not approve social account” is a consequence of first error.

Regards,
Kate.

Hi Kate,

I was suspecting that it’s a url that needs to be added, although I didn’t know which one. Yes, that fixed the “Safari cannot open page” error, thank you.

However, the fields are still not being mapped.

Hey guys, actually the fields are being mapped. I was just not using the right fields. The problem should be fixed now. Thanks so much!

One more thing about the Twitter easyLoginWithTwitterFieldsMapping login method: I use it with the responder, the response is “1” (I don’t know what “1” means) and I saw in the login with Facebook documentation that the newly logged in user is read in the openURL method from AppDelegate. However, this method does not gets called, even though the user is saved on Backendless.

Do you know what could be the problem?

I try to read the user from AppDelegate as it follows:

    let backendlessService = Backendless.sharedInstance()

    let user = backendlessService.userService.handleOpenURL(url)

    if user != nil {

        print("App delegate -> open url -> user = \(user)")

    }

    else {

        print("App delegate -> open url -> user is nil")

    }

But the thing is that this method does not gets called

Hey guys, I also fixed that :slight_smile: turns out that there was a second method of openURL in that was getting called in AppDelegate and I had to put the code there. Thanks again!

Could you add new support issue with this description?

The issue is fixed for me. The mistake I made was that I had both openURL methods in AppDelegate:

application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool
and

application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject)

I was handling the response in the second one, but the code was getting called on the first method. So I gave up on first method and done the handling in the second one. Developers could opt for whichever may prefer of two, but in my case the first method had priority and second one wasn’t getting called anymore.