LinkedIn API Automated Posting

Free API provided by LinkedIn itself is limited to personal pages and groups only. You can’t post to LinkedIn Company Pages using free built-in LinkedIn API.

NextScripts API for LinkedIn adds the ability to make automated posts LinkedIn Company pages and LinkedIn Groups. NextScripts API for LinkedIn is included to the Social Networks Auto Poster PRO Plugin version 2.2 or later.

LinkedIn API


The script is very easy to use.


Please note, those examples are for using SNAP API directly from PHP. if you are looking for auto-posting from WordPress to LinkedIn you just need the SNAP Pro WordPress plugin. SNAP API Run-Time is built in the SNAP Pro WordPress plugin. No PHP coding is necessary with WordPress.

1. Post text message with attached link to your LinkedIn Company Page:

  require_once "nxs-api/nxs-api.php"; 
  require_once "nxs-api/nxs-http.php"; 
  require_once "inc/nxs-functions.php"; 
  $email = ''; 
  $pass = 'YourPassword';
  $msg = 'Post this to LinkedIn Company Page'; 
  $to = '';
  $lnkArr['postType'] = 'A'; 
  $lnkArr['url'] = '';

  $nt = new nxsAPI_LI();
  $loginError = $nt->connect($email, $pass);     
  if (!$loginError)
      $result = $nt -> post($msg);
  else echo $loginError; 
  if (!empty($result) && is_array($result) && !empty($result['post_url'])) 
    echo '<a target="_blank" href="'.$result['post_url'].'">New Post</a>'; 
    echo "<pre>".print_r($result, true)."</pre>";
© 2012-2016