Twitter Kit will choose log in methods, it will not ask user to login if there is no account logged into iOS Device

ios
login

#1

Twitter Kit will choose log in methods, it will not ask user to login if there is no account logged into iOS Device and also it is showing error like

[TwitterKit] did encounter error with message “Unable to authenticate using the system account.”: Error Domain=TWTRLogInErrorDomain Code=2 “User allowed permission to system accounts but there were none set up.” UserInfo=0x17026cb40 {NSLocalizedDescription=User allowed permission to system accounts but there were none set up.}

[TwitterKit] did encounter error with message “Error obtaining user auth token.”: Error Domain=TWTRLogInErrorDomain Code=-1 “<?xml version="1.0" encoding="UTF-8"?>

Desktop applications only support the oauth_callback value ‘oob’
/oauth/request_token

” UserInfo=0x17026a5c0 {NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>

Desktop applications only support the oauth_callback value ‘oob’
/oauth/request_token

}

Am using the Fabric (1.6.11), TwitterCore (2.7.0), TwitterKit (2.7.0) Version to integrating twitter

Please help me out
Thanks in advance


#2

Hey @NandaAugusta2,

You can control the various mechanisms used to login via Twitter Kit. There’s more information on that here: https://docs.fabric.io/apple/twitter/log-in-with-twitter.html#log-in-with-twitter

It is described in the paragraph starting with “Developers can have more control over which methods…”

-Mike


#3

Thanks for your response Bonnell.
I have used the custom button action to access the Twitter login with the LogIn method.
Here i have given my code where am using in the custom button click

The Code is,

Twitter.sharedInstance().logIn {
            (session, error) -> Void in
            if (session != nil) {
              
                })
            }

Anything missed in this method or we need to do anything more in this?


#4

Hey @NandaAugusta2,

As mentioned in the documentation:

“Developers can have more control over which methods are used for logging in to Twitter by using the TWTRLoginMethod enum defined in Twitter.h along with the [Twitter logInWithMethods:completion:] method. By default, Twitter Kit will choose log in methods in the following order [System Account] -> [SFSafariViewController] -> [UIWebView]. With the TWTRLoginMethod enum, the developer can choose which methods to use when providing the user with the ability to log in using Twitter”


#5

I alse meet the same problem. Have you find any solution?


#7

Hey @MilookD - I recommend checking out the URL Mike referenced that describes controlling the various login options: https://docs.fabric.io/apple/twitter/log-in-with-twitter.html#log-in-with-twitter


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.