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