Hi,
This is my first post. I am trying to post a message onto LinkedIn and I am getting the following exception(please see attachment for full stack trace).java.lang.NoSuchFieldError: ALLOW_NUMERIC_LEADING_ZEROS
at org.springframework.social.linkedin.api.impl.Linke dInTemplate.registerLinkedInJsonModule(LinkedInTem plate.java:102)
at org.springframework.social.linkedin.api.impl.Linke dInTemplate.<init>(LinkedInTemplate.java:62)
at org.springframework.social.linkedin.connect.Linked InServiceProvider.getApi(LinkedInServiceProvider.j ava:38)
at org.springframework.social.linkedin.connect.Linked InServiceProvider.getApi(LinkedInServiceProvider.j ava:27)
I am using the following code. Please let me know if you see anything wrong with my usage.
ConnectionRepository connectionRepository = this.usersConnectionRepository.createConnectionRep ository("myusername"); //real username in code
Connection<LinkedIn> connection = connectionRepository.findPrimaryConnection(LinkedI n.class);
LinkedIn linkedin = connection.getApi(); //null checks done
linkedin.communicationOperations().sendMessage("Te sting", "This is my test from SocialMediaPoster", linkedin.profileOperations().getProfileId());
Thanks,
Sumanth


Reply With Quote
