Hi,
I regenerated the tokens and I retested with fresh data. I tried by adding the code to sample project(spring-social-showcase) too. I still got the same exception.
I added the following code to LinkedInConnectionsController.java:
Code:
String image="http://xxx.xxxxx.com/imgs/wizard_step4.png", url="google.com", title="sample", desc="descrrr";
NewShare share = new NewShare();
share.setComment(desc);
NewShareContent nsc = new NewShareContent();
nsc.setSubmittedImageUrl(image);
nsc.setSubmittedUrl(url);
nsc.setTitle(title);
share.setContent(nsc);
NewShareVisibility nsv = new NewShareVisibility();
nsv.setCode(NewShareVisibilityCode.ANYONE);
share.setVisibility(nsv);
boolean isAuth = linkedIn.isAuthorized(); // This is returning true, so authorization is good.
URI uri = linkedIn.networkUpdateOperations().share(share);
String postId = String.valueOf(uri.toString()).substring(uri.toASCIIString().indexOf("key=")+4);
I also added the following permissions to scope variable, just in case, to make sure its not creating the problem:
Code:
<input type="hidden" name="scope" value="r_basicprofile r_fullprofile r_emailaddress r_network r_contactinfo rw_nus rw_groups w_messages" />
The error message received from LinkedIn
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<status>400</status>
<timestamp>1368603413572</timestamp>
<request-id>VK1O09Y377</request-id>
<error-code>0</error-code>
<message>Couldn't parse share document: error: Unexpected element: CDATA</message>
</error>
I also tried by recreating the application in LinkedIn. Still, the issue persists.
Kindly let me know if you need any more information.
Best Regards
Rama Krishna

Originally Posted by
habuma
By any chance are you using access tokens that were obtained prior to this becoming a problem? Recently I changed Spring Social LinkedIn to take advantage of the fact that LinkedIn now supports OAuth 2. But if you're still using old access tokens, it probably won't work. You'll need to authorize again, get a new token, and try again.
If that's not the problem, then could you give me a bit more info. Specifically, which API binding method were you calling when you got this?