Search code examples
blackberrytwitterlinkedin-apiscribe

blackberry linkedin and twitter implementation error


I used Scribe1.2.jar file for implementing twitter.I use the following code

OAuthService service = new ServiceBuilder().provider(TwitterApi.class).apiKey("key").apiSecret("secret").build();
Token requestToken = service.getRequestToken();

When i compile the code, its showing the following error - org/scribe/builder/api/Api.class: Error!: Invalid class file: Incorrect classfile version. The same problem happends in Linkedin also. How to resolve the problem ?. I referred this link scribe doc


Solution

  • The jars you mentioned, scribe-1.2.0.jar and Linkedin-j.jar (You didn't mention the LinkedIn's one explicitly, but I guess you meant this one) are Java SE versions and can't be used on BlackBerry. You need to look for Java ME versions and if you find ones, you need to preverify them first.

    Refer to this question on additional information on preverification.

    Update: I downloaded scribe-1.2.0.jar and tried to preverify it. I got the following error:

    Error preverifying class org.scribe.extractors.BaseStringExtractorImpl VERIFIER ERROR org/scribe/extractors/BaseStringExtractorImpl.getSortedAndEncodedParams(Lorg/scribe/model/OAuthRequest;)Ljava/lang/String;: Cannot find class java/util/Map

    The reason is that java.util.Map doesn't exist in Java ME.