0
我想我的谷歌文檔從一個PHP文件中的文件時,得到了一個致命的錯誤,我寫如下代碼:我使用谷歌驅動API
require_once ("google/Google_Client.php");
require_once ("google/contrib/Google_DriveService.php");
$client=new Google_Client();
$client->setClientId('XXXX');
$client->setClientSecret('xxxx');
$client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
$client->setScopes(array('https://www.googleapis.com/auth/drive'));
$service = new Google_DriveService($client);
$parameters=array();
$parameters['q'] = "title contains 'something'";
$children = $service->children->listChildren('root',$parameters);
var_dump($children);
但返回以下信息:
Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/drive/v2/files/root/children?q=title%20contains%20%27something%27 : (404) Not Found'
thxü首先,我有一個問題更多,我只是想從谷歌驅動器獲得我的谷歌文檔鏈接,並使用谷歌文檔視圖來顯示我的個人網站的文檔,整個操作是隻讀,我每次有人瀏覽我的網站時都不希望獲得許可請求。那麼如何實現這一點?謝謝! –