I was wondering if I can develop a Desktop App for LinkedIn using Java. I know it can be done as a web application easily, but a completely desktop application, is it possible?
I had a look at the linkedin api’s and Java Wrapper for LinkedIn.
The code was explained for a web application. How do I manage that in a java desktop app, specifically the authorization part?
oAuth using Swing?
Please direct me in the right way.
After a very long time of testing with oAuth (with my own wrappers), I settled for Scribe which is a Java Wrapper for almost all oAuth mechanisms. To include Linkedin in a Desktop client, as Adam Trachtenberg (Thank you again) suggested, oob option was used, i.e., after logging in, a code generated by linkedin has to be entered in our Client so that it can be validated against the requested url. Hope this is useful for someone.
The
BareBonesBrowserLaunchis used to launch the default browser with the Linkedin URL for the token request in most OS’s. Since theDesktoppart is not available in Java 1.5, theBareBonesBrowserLaunchsolves the problem.The
LinkedInExampleis taken mostly from this library – https://github.com/fernandezpablo85/scribe-java/downloadsDon’t forget to include the Scribe jar and apache commons-codec (for
Base64)