0

I am using the Linkedin API OAuth 2.0 API and trying to like post/comments using the new OAuth 2.0 API.

The following example below shows an POST request to following endpoint:

POST https://api.linkedin.com/v2/socialActions/{commentUrn}/likes

https://api.linkedin.com/v2/socialActions/urn:li:share:543222277889832/likes

with the following POST JSON body

{
  "actor": "urn:li:person:0XV6h162Ub",
  "object": "urn:li:share:543222277889832"
}

and I get the following result

{
  "message": "Unable to obtain activity for urn: 'urn:li:share:543222277889832'",
  "status": 404
}

https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/network-update-social-actions#create-a-like-on-a-comment

I am unsure how the urn's work - how do I find the relevant urn for a particular person (as illustrated in the 'actor' below) and the object the Linkedin API documentation seems rather confusing.

Thanks in advance

Zabs
  • 13,852
  • 45
  • 173
  • 297

1 Answers1

0

Maybe the post is not processed by LinkedIn when you make a comment request. You should ask the post status before. If it's ok, launch the comment request.