Even though there is no such android specific sdk from linkedIn(like facebook and twitter sdk for android).Setting up linkedIn authorization with Oauth 1.0 was still easy us
OAuth 2.0 is much simpler than 1.0 and can be done without any help from an external library. However, if you are already using scribe-java, it will be even easier.
The implementation is straight-forward. You need to create a WebView
that has a custom WebViewClient
which captures and overrides loading behavior for your callback URL. Thus, when the WebView
attempts to load that URL, you can intercept the process and extract a verifier. The verifier can be passed to scribe-java to exchange for an access token.
To start the whole process, you just need to tell your WebView
to load the authorization URL.
I have sample code hosted here. The app authenticates with Buffer's API but most of the code can be reused. You may be interested in the fragment which hosts my custom WebView
and the background job that gets access token.
Feel free to ask me any follow up questions.