Я пытаюсь использовать 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: uncaught typeError: improde (): аргумент № 2 ($ array)
должен быть типа? Массив, строка, приведенная в
vendor\google\ apiclient\src\google\service\resource.php:291
Stack
trace:
#0 Vendor \ Google \ apiClient \ src \ Google \ Service \ Resource.php (291): Implode (Array, '&')
Поставщик \ Google \ apiClient \ src \ Google \ Service \ resource.php (189): Google_service_resource-> createrequesturi ('YouTube /V3 /Play ...', Array)
#2-й поставщик \ Google \ apiclient-services \ src \ youtube \ resource \ playlistems.phpems \ apiclient-services \ src \ you /> Google_service_resource-> call ('list', array, 'Google \ service \ ...')
#3 upload.php (112): Google \ service \ youtube \ resource \ playlistItems-> listplaylististem Поставщик \ Google \ apiclient \ src \ Google \ Service \ Resource.php On Line 291
Подробнее здесь: https://stackoverflow.com/questions/795 ... atal-error
В PHP с использованием Apiclient с YouTube вызывает фатальную ошибку ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение