- Модуль: socialservices
- Путь к файлу: ~/bitrix/modules/socialservices/classes/general/facebook.php
- Класс: CFacebookInterface
- Вызов: CFacebookInterface::SendFeed
public function SendFeed($socServUserId, $message, $messageId)
{
$isSetOauthKeys = true;
if(!$this->access_token || !$this->userId)
$isSetOauthKeys = self::SetOauthKeys($socServUserId);
if($isSetOauthKeys === false)
{
CSocServMessage::Delete($messageId);
return false;
}
$message = CharsetConverter::ConvertCharset($message, LANG_CHARSET, "utf-8");
$arPost = array("access_token" => $this->access_token, "message"=> $message);
$result = @CHTTP::sPostHeader($this::GRAPH_URL."/".$this->userId."/feed", $arPost, array(), $this->httpTimeout);
if($result !== false)
{
if(!defined("BX_UTF"))
$result = CharsetConverter::ConvertCharset($result, "utf-8", LANG_CHARSET);
return CUtil::JsObjectToPhp($result);
}
else
return false;
}