0

I'm using a php code right from bigbluebutton php API documentation, but it doesnt work. Here is the code:

use BigBlueButton/BigBlueButton;

$bbb                 = new BigBlueButton();
$createMeetingParams = new CreateMeetingParameters('bbb-meeting-uid-65', 'BigBlueButton API Meeting');
$response            = $bbb->createMeeting($createMeetingParams);

echo "Created Meeting with ID: " . $response->getMeetingId();

I get this error from php logs:

syntax error, unexpected '/', expecting ',' or ';' in /var/www/html/bbbapi/index.php on line 1

I'm running it using php 5.6 on ubuntu 16.4 i've tried a slash and a backslash but it just wont work i'm very surprised by this, since i've used use by the past. Anyone has an idea ?

1 Answer 1

1

Try change '/' by '\' in your code:

use BigBlueButton\BigBlueButton;

UPDATE:

I tested in a simple php file and added this changes to make work:

<?php
require 'vendor/autoload.php';

use BigBlueButton\BigBlueButton;
use BigBlueButton\Parameters\CreateMeetingParameters;

$bbb                 = new BigBlueButton();
$createMeetingParams = new CreateMeetingParameters('bbb-meeting-uid-65', 'BigBlueButton API Meeting');
$response            = $bbb->createMeeting($createMeetingParams);

echo "Created Meeting with ID: " . $response->getMeetingId();
Sign up to request clarification or add additional context in comments.

4 Comments

As said in my post i've already tried this, and it doesnt work
i get this error: Class 'BigBlueButton\BigBlueButton' not found in /var/www/html/bbbapi/index.php on line 5
I updated the answer. I don't know where you are trying to use this, but i tested in here in a simple php file and added this changes.
Thanks that solved the issue; i also had to add use BigBlueButton\Parameters\CreateMeetingParameters;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.