• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/bitrix24net.php
  • Класс: CBitrix24NetOAuthInterface
  • Вызов: CBitrix24NetOAuthInterface::__construct
public function __construct($appID = false, $appSecret = false, $code = false)
{
	if($appID === false)
	{
		$appID = trim(CSocServBitrix24Net::GetOption("bitrix24net_id"));
	}

	if($appSecret === false)
	{
		$appSecret = trim(CSocServBitrix24Net::GetOption("bitrix24net_secret"));
	}

	list($prefix, $suffix) = explode(".", $appID, 2);

	if($prefix === 'site')
	{
		$this->addScope("client");
	}
	elseif($prefix == 'b24')
	{
		$this->addScope('profile');
	}

	$this->httpTimeout = SOCSERV_DEFAULT_HTTP_TIMEOUT;

	$this->appID = $appID;
	$this->appSecret = $appSecret;
	$this->code = $code;

	$this->networkNode = self::NET_URL;
}