问题
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