I can create the sub folder just fine with the code below but I just can't return the id.
I would like to get the id and/or the link to the folder so I can add them to my database.
Currently the below creates the folder but just returns "//" as the id!
Thanks for your help
<?php
if ($client->getAccessToken()) {
$file = new Google_DriveFile();
//Setup the Folder to Create
$file->setTitle('Project Folder');
$file->setDescription('A Project Folder');
$file->setMimeType('application/vnd.google-apps.folder');
//Set the ProjectsFolder Parent
$parent = new Google_ParentReference();
$parent->setId('0B9mYBlahBlahBlah');
$file->setParents(array($parent));
//create the ProjectFolder in the Parent
$createdFile = $service->files->insert($file, array(
'mimeType' => 'application/vnd.google-apps.folder',
));
// print_r($createdFile);
print "folder created sucessfully";
echo "folder id is" . $createdFile->id;
}
?>