public function comment($uid, $comment) {
	  // check passed data
	  if(!is_string($uid)) {
	    // bad data passed
		  throw new LinkedInException('LinkedIn->comment(): bad data passed, $uid must be of type string.');
	  }
    if(!is_string($comment)) {
      // nothing/non-string passed, raise an exception
		  throw new LinkedInException('LinkedIn->comment(): bad data passed, $comment must be a non-zero length string.');
    }
    
    /**
     * Share comment rules:
     * 
     * 1) No HTML permitted.
     * 2) Comment cannot be longer than 700 characters.     
     */
    $comment = substr(trim(htmlspecialchars(strip_tags($comment))), 0, self::_SHARE_COMMENT_LENGTH);
		$data    = '<?xml version="1.0" encoding="UTF-8"?>
                <update-comment>
  				        <comment>' . $comment . '</comment>
  				      </update-comment>';

    // construct and send the request
    $query    = self::_URL_API . '/v1/people/~/network/updates/key=' . $uid . '/update-comments';
    $response = $this->fetch('POST', $query, $data);
    
    /**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ 
    return $this->checkResponse(201, $response);
	}
public function comment($uid, $comment) {
	  // check passed data
	  if(!is_string($uid)) {
	    // bad data passed
		  throw new LinkedInException('LinkedIn->comment(): bad data passed, $uid must be of type string.');
	  }
    if(!is_string($comment)) {
      // nothing/non-string passed, raise an exception
		  throw new LinkedInException('LinkedIn->comment(): bad data passed, $comment must be a non-zero length string.');
    }
    
    /**
     * Share comment rules:
     * 
     * 1) No HTML permitted.
     * 2) Comment cannot be longer than 700 characters.     
     */
    $comment = substr(trim(htmlspecialchars(strip_tags($comment))), 0, self::_SHARE_COMMENT_LENGTH);
		$data    = '<?xml version="1.0" encoding="UTF-8"?>
                <update-comment>
  				        <comment>' . $comment . '</comment>
  				      </update-comment>';

    // construct and send the request
    $query    = self::_URL_API . '/v1/people/~/network/updates/key=' . $uid . '/update-comments';
    $response = $this->fetch('POST', $query, $data);
    
    /**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ 
    return $this->checkResponse(201, $response);
	}
public function comment ( $ uid , $ comment ) { // check passed data if ( ! is_string ( $ uid ) ) { // bad data passed throw new LinkedInException ( 'LinkedIn->comment(): bad data passed, $uid must be of type string.' ) ; } if ( ! is_string ( $ comment ) ) { // nothing/non-string passed, raise an exception throw new LinkedInException ( 'LinkedIn->comment(): bad data passed, $comment must be a non-zero length string.' ) ; } /**
     * Share comment rules:
     * 
     * 1) No HTML permitted.
     * 2) Comment cannot be longer than 700 characters.     
     */ $ comment = substr ( trim ( htmlspecialchars ( strip_tags ( $ comment ) ) ) , 0 , self :: _SHARE_COMMENT_LENGTH ) ; $ data = '<?xml version="1.0" encoding="UTF-8"?>
                <update-comment>
  				        <comment>' . $ comment . '</comment>
  				      </update-comment>' ; // construct and send the request $ query = self :: _URL_API . '/v1/people/~/network/updates/key=' . $ uid . '/update-comments' ; $ response = $ this -> fetch ( 'POST' , $ query , $ data ) ; /**
	   * Check for successful request (a 201 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ return $ this -> checkResponse ( 201 , $ response ) ; }
Share comment posting method.

Post a comment on an existing connections shared content. API details can
be found here:

http://developer.linkedin.com/docs/DOC-1043

@param str $uid
The LinkedIn update ID.
@param str $comment
The share comment to be posted.

@return arr
Array containing retrieval success, LinkedIn response.
Share comment posting method .