• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/authmanager.php
  • Класс: CSocServAuthManager
  • Вызов: CSocServAuthManager::PostIntoBuzz
static function PostIntoBuzz($arUserTwit, $lastTwitId, $arSiteId=array())
{
	if(isset($arUserTwit['statuses']) && !empty($arUserTwit['statuses']))
	{
		foreach($arUserTwit['statuses'] as $userTwit)
		{
			if(isset($userTwit["id_str"]))
				$lastTwitId = ($userTwit["id_str"].'/' > $lastTwitId.'/') ? $userTwit["id_str"] : $lastTwitId;
			if(IsModuleInstalled('bitrix24') && defined('BX24_HOST_NAME'))
			{
				$userId = $userTwit['kp_user_id'];
				$rsUser = CUser::GetByID($userId);
				$arUser = $rsUser->Fetch();
				foreach(GetModuleEvents("socialservices", "OnPublishSocServMessage", true) as $arEvent)
					ExecuteModuleEventEx($arEvent, array($arUser, $userTwit, $arSiteId));
			}
			else
				self::PostIntoBuzzAsBlog($userTwit, $lastTwitId, $arSiteId);
		}
		return $lastTwitId;
	}
	return null;
}