嗨,我正在使用 linkiedin api,我有一个 xml
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;
}
在
$this->send_message
我有一条消息,我想添加一些带有消息的 HTML,但linkedin API 不允许我这样做。
即便是
<![CDATA[
Line 1 <br />
Line 2 <br />
Line 3 <br />
]]>
不在这里工作,so is there any built in xml tag i can use for line breaks ansd is there any tags equalant to HTML tags
。请帮忙
更新
如果我使用消息
"Elephanti <br/> invitation Message, Visite our site http://elephanti.com";
回应是
Invalid xml {Element not allowed: br@http://api.linkedin.com/v1 in element body@http://api.linkedin.com/v1}