After successfully authenticating via OAuth with full scope:
https://www.googleapis.com/auth/drive`
I create a folder according to the example in Creating a folder
var fileMetadata = {
'name' : name,
'mimeType' : 'application/vnd.google-apps.folder',
// 'parents': [ parent ]
};
gapi.client.drive.files.create({
resource: fileMetadata,
fields: 'id'
}, function(err, file) {
if(err) {
// Handle error
console.log(err);
} else {
console.log('Folder Id: ', file.id);
return file.id;
}
});
The callback function is never invoked, no error in the console.
How can i find out what's going on?