O'Reilly logo

Java 9: Building Robust Modular Applications by Jason Lee, Peter Verhas, Dr. Edward Lavieri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OAuth and logging on to Twitter

We'll take a detour into LoginController in just a moment, but first, let's make sure we understand what's going on here. To log on to Twitter on behalf of a user, we need to generate an OAuth request token from which we get an authorization URL. The details of which are hidden nicely behind the Twitter4J API, but it is, basically, the OAuth authorization URL listed on the Application Management page with a request token passed as a query string. As we'll see, this URL is opened in a WebView, which prompts the user to authenticate against Twitter, and then authorize the application (or decline to):

If the user ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required