Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix errors in example README.MD #299

Open
Solo-it opened this issue Jul 10, 2022 · 1 comment
Open

fix errors in example README.MD #299

Solo-it opened this issue Jul 10, 2022 · 1 comment
Labels
2.x issue related with 2.x sdk version documentation issue related with documentation improvements hacktoberfest-accepted Hacktoberfest

Comments

@Solo-it
Copy link

Solo-it commented Jul 10, 2022

Сейчас в инструкции указан код, который не работает.
Не написано что нужно поставить monolog
а подключение библиотеки Bitrix24/Bitrix24 не происходит

@Solo-it
Copy link
Author

Solo-it commented Jul 10, 2022

use Monolog\Logger;
use Monolog\Handler\StreamHandler;

// create a log channel
$log = new Logger('bitrix24');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::DEBUG));


// init lib
$obB24App = new \Bitrix24\Bitrix24(false, $log);
$obB24App->setApplicationScope($arParams['B24_APPLICATION_SCOPE']);
$obB24App->setApplicationId($arParams['B24_APPLICATION_ID']);
$obB24App->setApplicationSecret($arParams['B24_APPLICATION_SECRET']);
 
// set user-specific settings
$obB24App->setDomain($arParams['DOMAIN']);
$obB24App->setMemberId($arParams['MEMBER_ID']);
$obB24App->setAccessToken($arParams['AUTH_ID']);
$obB24App->setRefreshToken($arParams['REFRESH_ID']);

// get information about current user from bitrix24
$obB24User = new \Bitrix24\User\User($obB24App);
$arCurrentB24User = $obB24User->current();

Я про этот код

@mesilov mesilov added 2.x issue related with 2.x sdk version documentation issue related with documentation improvements labels Jul 10, 2022
@mesilov mesilov added the hacktoberfest-accepted Hacktoberfest label Oct 29, 2022
@mesilov mesilov changed the title Исправить README.MD fix errors in example README.MD Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x issue related with 2.x sdk version documentation issue related with documentation improvements hacktoberfest-accepted Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants