Scribe and Spring Social integration for accessing LinkedIn APIs

1.2k views Asked by At

A couple of days back I was tasked with integrating Scribe and Spring Social for accessing LinkedIn APIs. Development environment being Windows, Spring and Java.

Spring Social's (spring-social-core-1.0.0.M1.jar) LinkedInTemplate uses org.scribe.extensions.linkedin.LinkedInBaseStringExtractorImpl. (Log messages showed "NoClassDefFoundError" for LinkedInBaseStringExtractorImpl) This class is present in scribe-1.0.7.jar but not in the latest jar i.e scribe-1.1.0.jar (downloaded at https://github.com/fernandezpablo85/scribe-java).

I couldn't find a way to fix this issue. But I was able to do a quick hack: on my local machine, I copied LinkedInBaseStringExtractorImpl from scribe-1.0.7.jar into scribe-1.1.0.jar. Everything works like a charm now.

I am curious to know if anyone else faced similar issues.

1

There are 1 answers

1
Pablo Fernandez On

What you say is right. Scribe changed it's internals from 1.0 to 1.1 (and greater), though the public apis didn't change, some internals did, and this class LinkedInBaseStringExtractorImpl is no longer part of the lib.

Anyway, you don't need SpringSocial at all, check the LinkedIn example to see how to consume LinkedIn's Api using just scribe.