youtube-api - Youtube API - 允许订阅用户,但次日取走
问题描述
我们有一个产品可以在一个用户通过后订阅另一个用户,并给予我们这样做的完全许可。然后用户订阅了这些其他用户......您可以在执行 API 后在 youtube 中看到这一点(似乎成功)......但是一天后订阅者被删除并消失了?这一直运作良好。任何人都遇到过类似的问题或知道为什么在这里?
当使用具有完整权限范围的 API 时,我们将用户订阅到一个频道,我们会得到不同的结果:
Google_Service_YouTube_Subscription_Object 与有效数据一起返回
频道订阅https://www.youtube.com/subscribers?ar=2&o=U可能会或可能不会增加价值(顶部的计数器)
频道订阅者列表https://www.youtube.com/subscribers?ar=2&o=U未显示新用户(订阅者)
用户在他们的 Youtube 视图中显示他们订阅了频道
根据用户隐私设置显示用户对视频的评论
对视频点赞的用户会被计算在内
第二天:评论、订阅者数量从频道中删除,视频上的点赞数似乎保持不变
$youtube_client = new \Google_Client();
$youtube_client->setClientId(xxxx);
$youtube_client->setClientSecret(xxxx);
$youtube_client->setScopes(xxxx);
$youtube_client->setRedirectUri(xxxx);
$youtube = new \Google_Service_YouTube($youtube_client);
$resourceIdyt = new \Google_Service_YouTube_ResourceId();
$resourceIdyt->setChannelId($channel);
$resourceIdyt->setKind('youtube#channel');
$subscriptionSnippetyt = new \Google_Service_YouTube_SubscriptionSnippet();
$subscriptionSnippetyt->setResourceId($resourceIdyt);
$subscriptionyt = new \Google_Service_YouTube_Subscription();
$subscriptionyt->setSnippet($subscriptionSnippetyt);
$subscriptionResponse = $youtube->subscriptions->insert('id,snippet', $subscriptionyt, array());
解决方案
推荐阅读
- python - django模块'appname'没有属性'models'
- google-apps-script - Rhino Runtime 和 V8 在一起?
- r - R中矩阵的递归
- webkit - WebKit2.WebView(和 Gnome 浏览器)不播放 YouTube 视频
- react-native - 找不到函数`visibleFeatures`
- python - 在 windows10 上安装 pytorch/tensorflow 时访问被拒绝
- google-apps-script - 如何在 google appscripts 中自动更新代码更改
- reactjs - 基于 Context 属性的有状态值未更新
- modelica - 什么会影响 Modelica 中的仿真运行时
- r - 如何组合由自动绘图创建的两个图形?