Post Network Update
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:
- Actor: the first and last name of the user initiating the activity. Include a URL to the user's profile on LinkedIn
- Activity: the action the user completed.
- 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
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.
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.
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.
|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".
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=&key=3639896&authToken=JdAa&authType=name&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:
<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:
&lt;a href=&quot;http://www.linkedin.com/profile?viewProfile=&amp;key=3639896&amp;authToken=JdAa&amp;authType=name&amp;trk=api*a119686*s128146*&quot;&gt;Kirsten Jones&lt;/a&gt; is reading about &lt;a href=&quot;http://www.tigers.com&quot;&gt;Tigers&lt;/a&gt;http://www.tigers.com&gt;Tigers&lt;/a&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>&lt;a href=&quot;http://www.linkedin.com/profile?viewProfile=&amp;key=3639896&amp;authToken=JdAa&amp;authType=name&amp;trk=api*a119686*s128146*&quot;&gt;Kirsten Jones&lt;/a&gt; is reading about &lt;a href=&quot;http://www.tigers.com&quot;&gt;Tigers&lt;/a&gt;http://www.tigers.com&gt;Tigers&lt;/a&gt;..</body> </activity>
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.
- Core Concepts
- Job Posting
- Share and Social Stream
- Libraries and Tools
- LinkedIn Policies
- Integrating your OS X Mavericks Application with LinkedIn