public function sendMessage($recipient, $subject, $body)
	{
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key']
		);

		// Set the success response code.
		$this->oauth->setOption('success_code', 201);

		// Set the API base.
		$base = '/v1/people/~/mailbox';

		// Build the xml.
		$xml = '<mailbox-item>
				  <recipients>';

		if (is_array($recipient))
		{
			foreach ($recipient as $r)
			{
				$xml .= '<recipient>
							<person path="/people/' . $r . '"/>
						</recipient>';
			}
		}

		$xml .= '</recipients>
				 <subject>' . $subject . '</subject>
				 <body>' . $body . '</body>
				</mailbox-item>';

		$header['Content-Type'] = 'text/xml';

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header);

		return $response;
	}
public function sendMessage($recipient, $subject, $body)
	{
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key']
		);

		// Set the success response code.
		$this->oauth->setOption('success_code', 201);

		// Set the API base.
		$base = '/v1/people/~/mailbox';

		// Build the xml.
		$xml = '<mailbox-item>
				  <recipients>';

		if (is_array($recipient))
		{
			foreach ($recipient as $r)
			{
				$xml .= '<recipient>
							<person path="/people/' . $r . '"/>
						</recipient>';
			}
		}

		$xml .= '</recipients>
				 <subject>' . $subject . '</subject>
				 <body>' . $body . '</body>
				</mailbox-item>';

		$header['Content-Type'] = 'text/xml';

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'POST', $parameters, $xml, $header);

		return $response;
	}
public function sendMessage ( $ recipient , $ subject , $ body ) { $ token = $ this -> oauth -> getToken ( ) ; // Set parameters. $ parameters = array ( 'oauth_token' => $ token [ 'key' ] ) ; // Set the success response code. $ this -> oauth -> setOption ( 'success_code' , 201 ) ; // Set the API base. $ base = '/v1/people/~/mailbox' ; // Build the xml. $ xml = '<mailbox-item>
				  <recipients>' ; if ( is_array ( $ recipient ) ) { foreach ( $ recipient as $ r ) { $ xml .= '<recipient>
							<person path="/people/' . $ r . '"/>
						</recipient>' ; } } $ xml .= '</recipients>
				 <subject>' . $ subject . '</subject>
				 <body>' . $ body . '</body>
				</mailbox-item>' ; $ header [ 'Content-Type' ] = 'text/xml' ; // Build the request path. $ path = $ this -> getOption ( 'api.url' ) . $ base ; // Send the request. $ response = $ this -> oauth -> oauthRequest ( $ path , 'POST' , $ parameters , $ xml , $ header ) ; return $ response ; }
Method used to send messages via LinkedIn between two or more individuals connected to the member sending the message.

@param   mixed   $recipient  A string containing the member id or an array of ids.
@param   string  $subject    The subject of the message that will be sent to the recipient
@param   string  $body       A text of the message.

@return  array  The decoded JSON response

@since   1.0
Method used to send messages via LinkedIn between two or more individuals connected to the member sending the message .