hi i am using the linkedin api to send invitations . in the message
<?xml version='1.0' encoding='UTF-8'?>
<mailbox-item>
<recipients>
<recipient>
<person path='/people/~'/>
</recipient>
<recipient>
<person path="/people/abcdefg" />
</recipient>
</recipients>
<subject>Congratulations on your new position.</subject>
<body>You're certainly the best person for the job!</body>
</mailbox-item>
in the <body> section i am trying to add some HTML .
like
<b>You’re certainly the best person for the job!</b>
but the problem is it is shown as text as it is in the message recieved by the friend , instad of that i want to bold the message content . how can i do this . is there any configuration should be done .
i am using codeigniter
function send_messeges($access_token, $xml_atring) {
$profile_url = "http://api.linkedin.com/v1/people/~/mailbox";
$xml = '<?xml version="1.0" encoding="UTF-8" ?>
<mailbox-item>
<recipients>
' . $xml_atring . '
</recipients>
<subject>'.$this->send_subject.'</subject>
<body>'.$this->send_message.'</body>
</mailbox-item>';
$request = OAuthRequest::from_consumer_and_token($this->consumer, $access_token, "POST", $profile_url);
$request->sign_request($this->method, $this->consumer, $access_token);
$auth_header = $request->to_header("https://api.linkedin.com");
$response = $this->httpRequest($profile_url, $auth_header, "POST", $xml);
return $response;
}
please help . thanks in advance
If you want to wrap html in xml, you have to use a construct like this:
But be careful to read the api docs:
https://developer.linkedin.com/documents/messaging-between-connections-api
This shows you cannot use html here.
You can however use basic string formatting such as newlines to have at least some paragraphs:
This is done via
\n(escaped newline) within the string.