Camellia
Camellia

Reputation: 176

LinkedIn API "Company Follow" how to Start follow a company

Everyone, I am implementing Linkedin API now. Most API request works fine. But I had met a problem for "Start Follow a company":

POST

http://api.linkedin.com/v1/people/~/following/companies

This is the request sample LinkedIn give, but there is no place to put id parameter, how to tell LinkedIn that which company I want to follow ?

I tried to use the similar one with Stop following, but it didnt work...

DELETE

http://api.linkedin.com/v1/people/~/following/companies/id={id}

Is any one know how to use it ?

Thank you.

Upvotes: 0

Views: 953

Answers (1)

Unpossible
Unpossible

Reputation: 10697

From the docs, to get a list of companies the current user is following, you do:

GET
http://api.linkedin.com/v1/people/~/following/companies

To start following a company, you do:

POST
http://api.linkedin.com/v1/people/~/following/companies
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<company>
  <id>{id}</id>
</company>

To stop following you have it correct:

DELETE
http://api.linkedin.com/v1/people/~/following/companies/id={id}

You can play around with these on the REST Console to get familiar with them.

Upvotes: 2

Related Questions