php - Google drive api add shared folder to my files -


i'm creating php script create folders within google drive account. once folder created then share using permissions, other users of google apps domain.

i've created part successfully, need add function can done througth ui, can't find way via api: want add folder files section of users (possibly in sub folder) throught ui can done going "files shared me" section, right clicking , selecting "add file"

how can programmatically? there's way?

edit

i want programmatically in users directory

http://i.stack.imgur.com/ii3q6.png

at moment, can create file , folder in users directory, don't know how add folder shared other users

i've found answer question. left here, if need ;)

to add shared folder of user a, in user b "my files", need access drive api using user b, shared folder (it has same id has in user instance), , add parent of folder root dir, or folder inside user b drive.

$about = $userbserviceinstance->about->get(); $userbrootfolderid = $about->getrootfolderid();  $newparent = new google_service_drive_parentreference(); $newparent->setid($userbrootfolderid);  $userbserviceinstance->parents->insert($folderid, $newparent); 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -