Tuesday, January 21, 2014

How do I: Create a LinkedIn post using the Share API


bodyRequest = JSON.stringify({

   "comment": "Check out the LinkedIn Share API!",

   "content": {

      "title": "LinkedIn Developers Documentation On Using the Share API",

      "description": "Leverage the Share API to maximize engagement on user-generated content on LinkedIn",

      "submittedUrl": "https://developer.linkedin.com/documents/share-api",

      "submittedImageUrl": "http://m3.licdn.com/media/p/3/000/124/1a6/089a29a.png"

   },

    "visibility": {
"code": "anyone"
  }

})

IN.API.Raw("people/~/shares")
           .method("POST")
           .body(bodyRequest)
           .result(function(result) { console.log("Success") }).
           error(function(result) {
              console.log(JSON.stringify(result));
           });

Helpful LinkedIn Documentation

2 comments:


  1. 403
    1553501413674
    J2EK9T1WR0
    0
    Access to shares denied

    ReplyDelete


  2. 403
    1553578830667
    M5Q897DVBV
    0
    Access to posting shares denied

    ReplyDelete