Push API \ Publish Post On LinkedIn PHP SDK

Resource/URI @Facebook GET POST PUT DELETE
Publish Post On Facebook /push/identities/<identity_token>/facebook/post.json Publish
Post
Upload Picture To Facebook /push/identities/<identity_token>/facebook/picture.json Upload
Picture
Upload Video To Facebook /push/identities/<identity_token>/facebook/video.json Upload
Video
Resource/URI @LinkedIn GET POST PUT DELETE
Publish Post On LinkedIn /push/identities/<identity_token>/linkedin/post.json Publish
Post
Resource/URI @Twitter GET POST PUT DELETE
Publish Tweet On Twitter /push/identities/<identity_token>/twitter/post.json Publish
Tweet
Upload Picture To Twitter /push/identities/<identity_token>/twitter/picture.json Upload
Picture

Workflow

Request: the code to send to the API

Send a POST request with the data below to the endpoint /push/identities/<identity_token>/linkedin/post.json to share a new message on behalf of a LinkedIn user. The <identity_token> is obtained whenever one of your users connects using a social network account.

To be able to use this endpoint LinkedIn must be fully configured for your OneAll Site and the user must have given consent to publish content on his behalf when he logged in with LinkedIn.

POST data to include in the request

    {
     "request":{
       "push":{			
         "post":{
           "title": "#title#",
           "description": "#description#",
           "message": "#message#",
           "link": "#link#",
           "picture": "#picture#",
         }
       }
     }
    }
	
Key Description
#title# The title of the content being shared. No more than 200 characters.
Example: My holiday in Spain!
#description# The description of the content being shared. No more than 256 characters.
Example: Barcelona Football Stadium
#message# A comment to associated with the share. No more than 700 characters.
Example: The absolute best part of my holiday was the Barcelona football stadium
* #link# The fully qualified URL of the link to share.
Example: https://www.fcbarcelona.com/
#picture# The fully qualified URL of the picture to share.
Example: https://www.fcbarcelona.com/stadium.jpg

Result: the code returned by the API

Resultset Example

{
  "response":{
    "request":{
      "date": "Fri, 22 Sep 2017 12:00:53  0200",
      "resource": "/push/identities/498ac3a3-ec9d-4a56-ba4a-0a3f3960145d/linkedin\/post.json",
      "status":{
        "flag": "success",
        "code": 200,
        "info": "Your request has been processed successfully"
      }
    },
    "result":{
      "data":{
        "provider": "linkedin",
        "object": "post",
        "post_id": "UPDATE-111111111-6316934079757451264",
        "post_location": "https://www.linkedin.com/updates?discuss=&scope=1234567890&stype=M&topic=9876543210123456789&type=U&a=tJZK"
      }
    }
  }
}
	

User Contributed Notes