|
@@ -100,6 +100,12 @@ class YoutubeService implements SmmPlatformInterface
|
|
|
if ($fileSize['status'] === false) {
|
|
|
return ['status' => false, 'data' => $fileSize['data']];
|
|
|
}*/
|
|
|
+
|
|
|
+ $backup_field1 = $this->configData['postData']['backup_field1'] ?? '';
|
|
|
+ $backup_field1 = json_decode($backup_field1, true);
|
|
|
+ $title = $backup_field1['yutube_title'] ?? '';
|
|
|
+ $category = $backup_field1['yutube_category'] ?? '';
|
|
|
+
|
|
|
$videoPath = toStoragePath($videoPath);
|
|
|
|
|
|
$this->client->setAccessToken($accessToken);
|
|
@@ -108,11 +114,12 @@ class YoutubeService implements SmmPlatformInterface
|
|
|
try {
|
|
|
|
|
|
$snippetData = [
|
|
|
- 'title' => $message,
|
|
|
- 'description' => '',
|
|
|
+ 'title' => $title,
|
|
|
+ 'description' => $message,
|
|
|
'tags' => [],
|
|
|
- 'categoryId' => '22'
|
|
|
+ 'categoryId' => $category
|
|
|
];
|
|
|
+ Log::info('YouTube 定义视频元数据'.json_encode($snippetData));
|
|
|
$snippet = new Google_Service_YouTube_VideoSnippet();
|
|
|
$snippet->setTitle($snippetData['title']);
|
|
|
$snippet->setDescription($snippetData['description']);
|