0

Right now, I am using a library java library:

<dependency>
<groupId>com.googlecode.linkedin-j</groupId>
<artifactId>linkedin-j-core</artifactId>
<version>1.0.429</version>
</dependency>

bUT this does not work anymore. I the library is using deprecated API :

/v1/people/~/current-status

and whenever ran it throws exception as follows:

Exception in thread "main" com.google.code.linkedinapi.client.LinkedInApiClientException: Unsupported PUT target {/v1/people/~/current-status}

So I look-up at LinkedIn documentation for new updates, BUT could NOT find the appropriate documentation for publishing user current profile status...

https://developer.linkedin.com/documents/profile-api

Current code that stopped working is similar as follows using LinkedInJ:

LinkedInApiClientFactory factory = LinkedInApiClientFactory.newInstance(getApiKey(), getSecretApiKey());
LinkedInAccessToken accessToken = new LinkedInAccessToken(promotion.getAccessToken(), promotion.getSecretAccessToken());
LinkedInApiClient client = factory.createLinkedInApiClient(accessToken);
client.updateCurrentStatus("my status message");

How to post STATUS UPDATES on LinkedIn via its api?

paullabis
  • 19
  • 1
  • 4
  • 1
    This question appears to be off-topic because it is a customer support request, not a question about a programming problem. See [this meta post](http://meta.stackoverflow.com/questions/255745/why-were-not-customer-suppo‌​rt-for-your-favorite-company) for more information. – Ffisegydd Dec 30 '14 at 22:42
  • Actually, I've retracted my CV for this, so the above comment is not valid (IMO). – Ffisegydd Dec 30 '14 at 22:49

2 Answers2

0

Read your own question.

I the library is using deprecated API :

deprecated means that it is no longer supported, which is concurrent with the error message you're receiving:

Unsupported PUT target {/v1/people/~/current-status}

This means that the deprecated lib you're using has a function updateCurrentStatus but under the covers the API endpoint the request is being made to doesn't support the PUT verb.

Michael Angstadt
  • 880
  • 10
  • 18
0

To get rid of that error you need to add the linked-j jar in your build path. Here is the link to download the jar http://www.java2s.com/Code/Jar/l/Downloadlinkedinjjar.htm

My issue was solved after adding the jar.

J. Chomel
  • 8,193
  • 15
  • 41
  • 69
bunny sunny
  • 301
  • 6
  • 15