YouTube API v3 likes a video, but the counter doesn#39;t increase(YouTube API v3 点赞视频,但计数器不增加)
问题描述
每当我尝试通过 YouTube API 点赞视频时,它都会将该视频标记为点赞,但点赞计数器不会在我这样做时增加.它告诉我我喜欢该视频,因为喜欢"按钮是全绿色的,但它不算为喜欢?
Whenever I try to like a video through the YouTube API, it flags the video as liked but the like counter doesn't increase whenever I do. It tells me that I've liked the video, because the like button is fully green, but it doesn't count it as liked?
我通过 CURL 和 PHP 使用这个链接:
I'm using this link through CURL with PHP:
https://www.googleapis.com/youtube/v3/videos/rate?access_token=(the token)&id=(video id)&rating=like
如果我这样做,我不会收到错误消息.我没有得到任何回复,根据文档,这是正确的.
I don't get an error if I do this. I don't get any response back, which is correct according to the docs.
谁能告诉我为什么点赞数没有增加?
Could anyone tell me why the like counter doesn't increase?
可以使用 rating=dislike 添加不喜欢,但不会将喜欢添加到计数器!
Dislikes can be added with rating=dislike, but likes won't be added to the counter !
推荐答案
简单解释:Youtube 不计算直播点赞数和观看次数.它们会在一定时间后定期更新.这使谷歌能够分析喜欢/视图并过滤可疑行为.请记住视频的 301 次观看限制,几周前他们将其更改为显示 301+ 以表明已经有更多观看次数,但以后会增加观看次数.
因此,如果您等待几分钟/几小时,您的喜欢应该会出现,但您不能确定它真的是您的,因为在此期间任何人都可能喜欢它;)
Easy explanation: Youtube doesn´t count the likes live, as well as the views. They are periodical updated after a certain amount of time. This enables google to analyze the likes / views and filter suspicious actions. Remember the 301-views limit of the videos, a few weeks ago they changed it to display 301+ to indicate that there are more views already, but the count will incrase later on.
So if you wait a few minutes/hours your like should appear, but you cant be sure its really yours since anybody could have liked it too in the meantime ;)
您需要更详细的解释吗?
Do you need a more detailed explanation?
也许观看这个 youtube 视频 http://www.youtube.com/watch?v=oIkhgagvrjI 理解这个原则.
Maybe watch this youtube video http://www.youtube.com/watch?v=oIkhgagvrjI to understand that principle.
这篇关于YouTube API v3 点赞视频,但计数器不增加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:YouTube API v3 点赞视频,但计数器不增加
基础教程推荐
- 在多维数组中查找最大值 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01