Я пытаюсь использовать Google/Apiclient 2.0 в PHP. Это я получил до сих пор: < /p>
require 'vendor/autoload.php';
use Google\Client;
use Google\Service\YouTube;
$client = new Client();
$client->setAuthConfig('client_secret_apps.googleusercontent.com.json');
$youtube = new Google\Service\YouTube($client);
var_dump($youtube->playlistItems->listPlaylistItems(
'snippet', ['playlistId' => 'PLDxxxxxxxxxxxxxx']
));
< /code>
И я получаю эту фатальную ошибку: < /p>
Php Fatal Error: uncaught typeerror: improde (): аргумент № 2 ($ array)
должна быть типа? Stack
trace:
#0 Vendor \ Google \ apiclient \ src \ Google \ Service \ resource.php (291): Implode (Array, '&')
#1 Vendor \ Google \ Apiclient \ src \ Google \ Service \ Resource.php (189): Google_service_resource-> createrequesturi ('youtube /v3 /play ...', array)
#2 vendor \ google \ apiclient-services \ src \ youtube \ resource \ playlististems.php (127):
Google_service_resource-> Call ('list', array, array, 'google \> rail \> rail \> array \> array \> upload.php (112): Google \ Service \ YouTube \ Resource \ PlayListItems-> ListPlayListItems ('Snippet',
Array)
#4 {main} брошен в поставщик \ google \ apiclient \ src \ Google \ Service \ Resource.php на линии 291 < /p>
< /blockquet>
Подробнее здесь: https://stackoverflow.com/questions/795 ... atal-error
В PHP с использованием Apiclient с YouTube вызывает фатальную ошибку ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение