Ask for token when importing document from Google+. Fixes #353

This commit is contained in:
benweet 2014-03-19 22:52:51 +00:00
parent 17f5275c28
commit d445ccfec8

View File

@ -755,6 +755,10 @@ define([
if(pickerType == 'doc' || pickerType == 'folder') {
authenticate(task, 'gdrive', accountId);
}
else {
accountId = 'google.picasa0';
authenticate(task, 'picasa', accountId);
}
loadPicker(task);
task.onRun(function() {
var authorizationMgr = authorizationMgrMap[accountId];
@ -794,6 +798,7 @@ define([
view.setType('ofuser');
pickerBuilder.addView(view);
pickerBuilder.addView(google.picker.ViewId.PHOTO_UPLOAD);
authorizationMgr && authorizationMgr.token && pickerBuilder.setOAuthToken(authorizationMgr.token.access_token);
}
pickerBuilder.setCallback(function(data) {
if(data.action == google.picker.Action.PICKED || data.action == google.picker.Action.CANCEL) {