问题描述
每当我尝试通过 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 点赞视频,但计数器不增加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!