Post Network Update

Note: Before using this API make sure you understand LinkedIn's OAuth Authentication Model. POST-based requests with a content-type of application/xml are not part of the signing base string when calculating signatures.

The Post Network Update API allows you to send in an activity from your site to be posted to the first degree connections of the LinkedIn user. Network updates are the LinkedIn term for news feed activities and appear on the center column of the home page. Use it when a user on your site performs some activity on your site that they want to broadcast to their connections. For example, you might send a message "Peter Smith booked a trip to London, England on October 30."

Messages should have a specific format:

  1. Actor: the first and last name of the user initiating the activity. Include a URL to the user's profile on LinkedIn
  2. Activity: the action the user completed.
  3. Link: URL to see the subject of the activity.

Once a network update is posted, it cannot be removed or deleted.

It can often take up to 30 minutes for a network update posted to appear on the LinkedIn.com

Whitelist

This is the only API that has a whitelist. While your application is in beta mode, network updates you send are posted only to the developers on your whitelist who are also first degree connections. When you indicate that your application is live, network updates will then go to the entire first degree connections list of the user who posts them.

You toggle your application's status between Development or Live by visiting the API Provisioning page and setting the Application Status field. You can also add and remove developers to your application on that page.

Requirements

You must adhere to the following requirements when posting a message to LinkedIn:

  • A network update must be associated with a specific user action, not an automated or scheduled event. A user simply navigating through your application is not a significant event. Typically, a user must create content on your site for the event to be significant.
  • The user must be given a choice about whether to send the message. The user must opt into the messages being sent rather than opt out.
  • A network update must come at or around the time of the user action the update makes reference to.
  • A network update must be posted only once and only once by the user who initiated the action.
  • A network update must not be sent for users who were acted upon. So, if a user just presented at a conference, that might be a good network update to send. But every member of the audience should not send a network update saying they were in the audience.
  • An application must not offer any direct incentive to the user as a reward for issuing a network update.
  • An application must not offer any direct incentive to the recipients of a network update.

URL

Always take care in POSTing Network Updates. They go out to the entire 1st degree network of the member on whose behalf you are acting.

Fields for the XML Body

The only field that accepts HTML of any kind is the body. The only HTML accepted in the body are anchor tags ("<a href />"). Anchor tags must be HTML entity escaped before posting.

       

Field Required? Contents Notes
activity yes Nodes for the activity being created Parent node for the update. Should include a locale attribute indicating the IETF Language code of the contents. If unsure, specify "American English" with "en_US".
content-type yes Only linkedin-html Indicates that you may have a limited subset of HTML within the contents of your update.
body yes The body of the update The actual content of the update. You can use HTML to include links to the user name and the content the user created. Other HTML tags are not supported. All body text should be HTML entity escaped and UTF-8 compliant.

Building the Body

When building the body, it's critical that you include the link for the person who is posting the network update. If you want a simpler implementation, you might consider using the newer Share API which handles this for you.

The correct format for this type of update must include the member's name, linked to their LinkedIn profile. You can retrieve this with a profile request for the individual as the "site-standard-profile-request".

Example call:

1
http://api.linkedin.com/v1/people/~:(id,first-name,last-name,site-standard-profile-request)

Response:

1
2
3
4
5
6
7
8
<person>
  <id>4Lpna3NZkr</id>
  <first-name>Kirsten</first-name>
  <last-name>Jones</last-name>
  <site-standard-profile-request>
    <url>http://www.linkedin.com/profile?viewProfile=&amp;key=3639896&amp;authToken=JdAa&amp;authType=name&amp;trk=api*a119686*s128146*</url>
  </site-standard-profile-request>
</person>

Use this URL to build the HTML for the body of the request. First, you will need to create the message you want to send:

1
<a href="http://www.linkedin.com/profile?viewProfile=&key=3639896&authToken=JdAa&authType=name&trk=api*a119686*s128146*">Kirsten Jones</a> is reading about <a href="http://www.tigers.com">Tigers</a>http://www.tigers.com>Tigers</a>.

Next, you need to encode the body for sending as part of the XML request:

1
&amp;lt;a href=&amp;quot;http://www.linkedin.com/profile?viewProfile=&amp;amp;key=3639896&amp;amp;authToken=JdAa&amp;amp;authType=name&amp;amp;trk=api*a119686*s128146*&amp;quot;&amp;gt;Kirsten Jones&amp;lt;/a&amp;gt; is reading about &amp;lt;a href=&amp;quot;http://www.tigers.com&amp;quot;&amp;gt;Tigers&amp;lt;/a&amp;gt;http://www.tigers.com&amp;gt;Tigers&amp;lt;/a&amp;gt;.

Once you've done that, you're ready to send your request.

Example XML Body

1
2
3
4
<activity locale="en_US"><br>
    <content-type>linkedin-html</content-type>
    <body>&amp;lt;a href=&amp;quot;http://www.linkedin.com/profile?viewProfile=&amp;amp;key=3639896&amp;amp;authToken=JdAa&amp;amp;authType=name&amp;amp;trk=api*a119686*s128146*&amp;quot;&amp;gt;Kirsten Jones&amp;lt;/a&amp;gt; is reading about &amp;lt;a href=&amp;quot;http://www.tigers.com&amp;quot;&amp;gt;Tigers&amp;lt;/a&amp;gt;http://www.tigers.com&amp;gt;Tigers&amp;lt;/a&amp;gt;..</body>
</activity>

Response

A successful response will be indicated by a 201 Created HTTP status code and an empty response body. While it may take some time for the update to publish on the website, the best place to locate updates posted from your own accounts is the My Network Updates page on LinkedIn.com

Retrieving Network Updates

Read Get Network Updates API to learn how to retrieve a member's network updates.