Scala Sign in with twitter and twitter4j


#1

Hi!

I’m trying to implement “Sign in with twitter” workflow in scala but i just can’t figure how.
I’ve managed to do PIN-Based authentication but this isn’t suitable for my application.
Here is my code :

private def signIn() {
        val cb = new ConfigurationBuilder
        cb.setDebugEnabled(true)
            .setOAuthConsumerKey("XXXXXXXXX")
            .setOAuthConsumerSecret("XXXXXXXXXXXXXXXXXX")

        val tf = new TwitterFactory(cb.build())
        val twit = tf.getInstance()
        val reqToken = twit.getOAuthRequestToken
        val accTokenUrl = reqToken.getAuthorizationURL //reqToken.getAuthenticationURL
        println(accTokenUrl)

    }

But when i go to the URL it gives me a PIN…

Any advice?