You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Example:
$file = $this->service->files->get($fileID);
$newPermission = new Google_Permission();
$newPermission->setValue('');
$newPermission->setType('anyone');
$newPermission->setRole('reader');
$newPermission->setWithLink(true);
try {
$this->service->permissions->insert($file->getId(), $newPermission);
}
catch (Exception $e) {
echo "An error occurred: " . $e->getMessage();
}
if ($file->getMimeType() === 'application/vnd.google-apps.folder')
$url = $file->getWebViewLink(); <--- empty. Tested with print_r($file);
else
$url = $file->getWebContentLink();
I fixed this Bug with following code, but it´s not that elegant.
$url = 'https://drive.google.com/folderview?id='.$fileID.'&usp=sharing';
What version of the product are you using? On what operating system?
0.6.7
Same problem here:
http://stackoverflow.com/questions/13664084/webviewlink-is-empty-null-when-using
-php-code-sample/13667012#13667012
Original issue reported on code.google.com by Markus.F...@gmail.com on 7 Dec 2013 at 11:18
The text was updated successfully, but these errors were encountered:
This issue tracker is now closing. Development on the Google PHP client library
moved to GitHub with the release of the 1.0.0-alpha, and now the 1.0 branch has
reached beta status there will be no further releases of the 0.6 branch of the
library.
Please take a look at the latest version on
https://github.com/google/google-api-php-client
For information on migrating, please take a look at this guide:
https://developers.google.com/api-client-library/php/guide/migration
For general library support please ask a question on StackOverflow:
http://stackoverflow.com/questions/tagged/google-api-php-client
If you are looking for support with a specific API, please contact the team
working with that API via StackOverflow or their preferred support mechanism.
If your issue still exists with the new version of the library, please raise a
bug in the GitHub issue tracker with a minimal code sample.
Thanks!
Original comment by ianbar...@google.com on 22 Jan 2014 at 4:56
Original issue reported on code.google.com by
Markus.F...@gmail.com
on 7 Dec 2013 at 11:18The text was updated successfully, but these errors were encountered: