Update to V2 assistance

1 view
Skip to first unread message

Alan C

unread,
Jan 11, 2011, 3:10:44 AM1/11/11
to CallWidget-Developers
Hi

I wish to update to V2 PHP and then get Premium edition of tokbox for
our application

Please provide me with the V2 equivalent code to my V1 code shown here

require_once 'SDK/TokBoxCall.php';
require_once 'SDK/TokBoxUser.php';

try {
$userObj = TokBoxUser::createGuest();
$callid = TokBoxCall::createCall($userObj);//guest
access to a call
$callUrl = TokBoxCall::generateLink($callid);//
generate call URL
} catch(Exception $e) {
echo $e->getMessage();
}

echo TokBoxCall::generateEmbedCode($callid);

-----------------------

My aim is to enable users to initiate a unique tokbox session
(without setting up their own Tokbox account) in which they can invite
any other person (as a guest) by using the Invite by Email function.

Melih Onvural

unread,
Jan 11, 2011, 3:50:31 AM1/11/11
to tokbox-d...@googlegroups.com
Alan,

A basic video chat in the new SDK would look something like this:

<?php

require_once 'SDK/API_Config.php';
require_once 'SDK/TokBoxAPI.php';
require_once 'SDK/TokBoxCall.php';

$apiObj = new TokBoxAPI(API_Config::PARTNER_KEY, API_Config::PARTNER_SECRET);
$callId = TokBoxCall::createCall($apiObj);

echo TokBoxCall::generateEmbedCode($callId);

?>

To learn how to use the more advanced functionality, please read through the following tutorial:

http://code.google.com/p/tokboxapi/wiki/PHPTutorialV1

--
Melih O.
me...@tokbox.com

> --
> You received this message because you are subscribed to the Google Groups "CallWidget-Developers" group.
> To post to this group, send email to tokbox-d...@googlegroups.com.
> To unsubscribe from this group, send email to tokbox-develop...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tokbox-developers?hl=en.
>

Reply all
Reply to author
Forward
0 new messages