Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

S_412_PRECONDITION_FAILED=Invalid arguments while sharing on company page

Today, I noticed that all my API calls making shares to LinkedIn company pages return the following error:

Invalid arguments: {S_412_PRECONDITION_FAILED=Invalid arguments}

I'm using XML format. I tried to make the same share but to LinkedIn accounts and it works very well.

Here is my xml request:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<share>
    <comment>Comment</comment>
    <content>
        <title>title</title>
        <description>description</description>
        <submitted-url>URL</submitted-url>
        <submitted-image-url>IMAGE_URL</submitted-image-url>
    </content>
    <visibility>
        <code>anyone</code>
    </visibility>
</share>

Has there been a breaking change in the LinkedIn API?

like image 674
Yhon A Avatar asked Sep 28 '17 10:09

Yhon A


2 Answers

Seems LinkedIn has killed oAuth 1.x tokens for /company operations.

Implemented oAuth 2 and things are working fine.

Did not find a public announcement of this change, but typical of LinkedIn to suck when it comes to their public API.

like image 78
Thomas Alderschmidt Avatar answered Sep 19 '22 15:09

Thomas Alderschmidt


Follow LinkedIns manual to implement oauth 2.0. Then everything works fine. https://developer.linkedin.com/docs/oauth2

like image 43
Michiel van Ballegooijen Avatar answered Sep 22 '22 15:09

Michiel van Ballegooijen