How to disable comments in YouTube API v3

左心房为你撑大大i 提交于 2019-12-20 02:34:40

问题


We were uploading videos and disabling comments in YouTube v2 via the access control elements:

<yt:accessControl action="list" permission="denied"/>
<yt:accessControl action="comment" permission="denied"/>
<yt:accessControl action="rate" permission="denied"/>

But now we have to migrate to v3 APIs and I do not see a way to accomplish the same thing. I only see the following fields that are updatable:

snippet.title
snippet.description
snippet.tags[]
snippet.categoryId
status.embeddable
status.license
status.publicStatsViewable
status.publishAt
status.privacyStatus
recordingDetails.locationDescription
recordingDetails.location.latitude
recordingDetails.location.longitude
recordingDetails.recordingDate

I do not see what the description for these fields are but the fields in the status part look promising but I don't know what valid values are for those fields.

Is it possible to disable comments and ratings in the version 3 API?


回答1:


Disabling comments and ratings on a video is not supported by the v3 API at this time. There is a known issue where if you disable comments on your videos in your channel preferences and then upload a video through the v3 API, comments are still allowed on the video (note that this bug was reported internally, but it does not appear to have been fixed). YouTube is still working out these features for v3.



来源:https://stackoverflow.com/questions/29440460/how-to-disable-comments-in-youtube-api-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!