• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/rest.php
  • Класс: CSocNetLogRestService
  • Вызов: CSocNetLogRestService::addBlogPost
static function addBlogPost($arFields)
{
	global $APPLICATION;

	try
	{
		$postId = Helper::addBlogPost($arFields, BitrixMainEngineController::SCOPE_REST);
		if ($postId <= 0)
		{
			$e = $APPLICATION->getException();
			throw new SystemException($e ? $e->getString() : 'Cannot add blog post');
		}
	}
	catch (Exception $e)
	{
		throw new SystemException($e->getMessage(), $e->getCode());
	}

	return $postId;
}