現在、ライブラリ Java ライブラリを使用しています。
<dependency>
<groupId>com.googlecode.linkedin-j</groupId>
<artifactId>linkedin-j-core</artifactId>
<version>1.0.429</version>
</dependency>
しかし、これはもう機能しません。Iライブラリは非推奨のAPIを使用しています:
/v1/people/~/current-status
実行されるたびに、次のように例外がスローされます。
Exception in thread "main" com.google.code.linkedinapi.client.LinkedInApiClientException: Unsupported PUT target {/v1/people/~/current-status}
そのため、LinkedIn のドキュメントで新しい更新情報を調べましたが、ユーザーの現在のプロファイル ステータスを公開するための適切なドキュメントが見つかりませんでした...
https://developer.linkedin.com/documents/profile-api
動作を停止した現在のコードは、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");
API を介して LinkedIn にステータスの更新を投稿する方法は?