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.
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.
精彩评论