Google drive api 如何使用PHP显示我的驱动器文件夹的文件夹和文件列表
有人能告诉我如何从谷歌硬盘访问我硬盘的所有文件和文件夹吗 我正在使用:Google drive api 如何使用PHP显示我的驱动器文件夹的文件夹和文件列表,google-drive-api,Google Drive Api,有人能告诉我如何从谷歌硬盘访问我硬盘的所有文件和文件夹吗 我正在使用: $client = new Google_Client(); // Get your credentials from the APIs Console $client->setClientId('1095973606032-jkkjsp0ja5qdvp6f8p629964a2n0aqpn.apps.googleusercontent.com'); $client->setClientSecret('1Tkpr3
$client = new Google_Client();
// Get your credentials from the APIs Console
$client->setClientId('1095973606032-jkkjsp0ja5qdvp6f8p629964a2n0aqpn.apps.googleusercontent.com');
$client->setClientSecret('1Tkpr3IVYX5n7YtwR_cI3Sui');
$client- >setRedirectUri('http://staging.test.jbiprojects.co.uk/google_drive/drive.php');
$client->setScopes('https://www.googleapis.com/auth/drive.file');
$service = new Google_DriveService($client);
$authUrl = $client->createAuthUrl();
我在这里做错了什么吗?看看谷歌。如果您复制粘贴代码,它将使您启动并运行
您不应上传文件,而应拨打以下电话:
$service->files->list
在这里查看PHP示例