Webview in Xcode 7 Simulator

ios
authorization

#1

How do i get the twitterkit to show my authorization through email and password in the webview of xcode? im using this code -

 @IBAction func TwitterButtonTapped(sender: AnyObject) {
       
        Twitter.sharedInstance().logInWithViewController(self, methods: .WebBased) { (session, error) in
            if (error != nil) {
                
                print("error: \(error!.localizedDescription)")
                
            } else {
                
              print("signed in as \(session!.userName)")
            }

        }
        
       
        
        
    }//end of func

i keep receiving this error message

"[TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <error>Desktop applications only support the oauth_callback value 'oob'</error>
  <request>/oauth/request_token</request>
</hash>
" UserInfo={NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <error>Desktop applications only support the oauth_callback value 'oob'</error>
  <request>/oauth/request_token</request>
</hash>
}
error: Request failed: unauthorized (401)"

#2

Hey @XpressMobtech,

Check out the documentation on this here: https://docs.fabric.io/apple/twitter/log-in-with-twitter.html#log-in-with-twitter Specifically:

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.
In order to use the SFSafariViewController log in method, the SafariServices.framework must be added to your app.