Nanacast integration with GoToWebinar

Article Details
URL: http://support.nanacast.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=233
Article ID: 233
Created On: 17 Jan 2012 01:21 PM

Answer

Our client Steve Ovens has shared the following code and instructions that work with the Nanacast API to create GotoWebinar registrations:

Make a file somewhere on your web server called register.php.

Put this in it: 

<?php 

$ch = curl_init(); 

curl_setopt($ch, CURLOPT_URL, "https://www1.gotomeeting.com/en_US/island/webinar/registration.flow"); 

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

curl_setopt($ch, CURLOPT_POST, true); 

$data = array( 

    'Template' => 'island/webinar/registration.tmpl', 

    'Form' => 'webinarRegistrationForm', 

    'WebinarKey' => $_REQUEST['webinarid'], 

    'ViewArchivedWebinar' => 'false', 

    'registrant' => '', 

    'RegistrantTimeZoneKey' => '8', 

    'Name_First' => $_REQUEST['u_firstname'], 

    'Name_Last' => $_REQUEST['u_lastname'], 

    'Email' => $_REQUEST['u_email'] 

); 

curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 

$output = curl_exec($ch);

$info = curl_getinfo($ch); 

curl_close($ch); 

?> 

You will need to know your webinar id (from GoToWebinar) to complete the integration with Nanacast. If you haven't already done so, set up your webinar as normal in GoToWebinar. 

Your webinar id shows in your webinar registration - it's that string of numbers at the end of https://www1.gotomeeting.com/register/xxxxxx 

Set up your Nanacast membership that you want to link to your GoToWebinar as normal. 

In the Notifications / Custom Fields page of your offer, enable the Advanced API, and in the API URLs, add an entry pointing to your register.php script, passing your webinar id from GoToWebinar as a variable called webinarid, e.g. 

http://<yourdomain>/<path-to-script>/register.php?webinarid=<your webinar id from GoToWebinar> 

UPDATE: Another client has indicated that the above script no longer works.

He recommends the following instead:

In the Nanacast Notification URL, just paste the following:

https://attendee.gotowebinar.com/registration.tmpl?webinar=XXXXXXXXXXXX&registrant.timeZone=8&registrant.givenName={u_firstname}&registrant.surname={u_lastname}&registrant.email={u_email}

Replace the XXXXXXXXXXXX with the webinar number in the URL of your registration link like shown below.

i.e. https://attendee.gotowebinar.com/register/1234567890

That's it. You can add a test member to test the integration.

(h/t: Jesus Perez)