Can anyone tell me why the first API call to venues/new works fine but I
get an authentication error on the second API call to events/new. I'm
using the PHP5 library and at this point in my code I am logged in
successfully...
<?php
$venue_args = array(
'name' => $_POST['venue_name'],
'address' => $_POST['address'],
'city' => $_POST['city'],
'region' => $_POST['region'],
'postal_code' => $_POST['postal_code'],
'country' => 'USA',
'venue_type' => $_POST['venue_type'],
'url' => $_POST['url']
);
$venue_results = $ev->call('venues/new', $venue_args);
$venue_id = $venue_results->id;
echo '<p>venue add successful</p>';
print_r($venue_results);
$start = $_POST['date'].' '.$_POST['start_time'];
$stop = $_POST['date'].' '.$_POST['stop_time'];
$event_args = array(
'title' => $_POST['event_title'],
'start_time' => $start,
'stop_time' => $stop,
'all_day' => $_POST['all_day'],
'description' => $_POST['description'],
'price' => $_POST['price'],
'venue_id' => $venue_id
);
$event_results = $ev->call('events/new', $event_args);
echo '<p>'.$event_results->response.'</p>';
print_r($event_results);
?>