Ver Fonte

社媒对接

moshaorui há 16 horas atrás
pai
commit
ed4431c67e
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      app/Services/Smm/YoutubeService.php

+ 3 - 1
app/Services/Smm/YoutubeService.php

@@ -32,7 +32,7 @@ class YoutubeService implements SmmPlatformInterface
         $this->client->setRedirectUri(env('DIST_SITE_URL').'/dist/callback/youtube');
         $this->client->setScopes([
             Google_Service_YouTube::YOUTUBE_UPLOAD,
-            Google_Service_YouTube::YOUTUBE,
+        //    Google_Service_YouTube::YOUTUBE,
         //    Google_Service_YouTube::YOUTUBE_FORCE_SSL,
         //    Google_Service_YouTube::YOUTUBE_READONLY,
         //    Google_Service_YouTube::YOUTUBEPARTNER,
@@ -126,6 +126,8 @@ class YoutubeService implements SmmPlatformInterface
             $snippet->setDescription($snippetData['description']);
             $snippet->setTags($snippetData['tags']);//'test', 'api'
             $snippet->setCategoryId($snippetData['categoryId']); // 人物与博客
+
+            //$snippet->setChannelId('目标频道ID'); // 不加代码默认发到默认频道(主频道)
             // 设置视频状态
             $status = new Google_Service_YouTube_VideoStatus();
             $status->setPrivacyStatus('public'); // public, private, unlisted