由于 Youtube Api V2 不再支持特定视频。谁能解释一下如何用 youtube api v3 点赞一个视频?我总是收到以下回复:
Response
400 Bad Request
- Show headers -
{
"error": {
"errors": [
{
"domain": "youtube.part",
"reason": "unexpectedPart",
"message": "contentDetails",
"locationType": "parameter",
"location": "part"
}
],
"code": 400,
"message": "contentDetails"
}
}
请求是:
Request
POST https://www.googleapis.com/youtube/v3/activities?part=snippet&key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.AHES6ZQUI8Gn7j93QZBmmdlDe7Ei-iqYseYAKAxyf3qTOHHwDHb-dA
X-JavaScript-User-Agent: Google APIs Explorer
{
"contentDetails": {
"like": {
"resourceId": {
"videoId": "video-id",
"kind": "youtube#video"
}
}
}
}
该部分是=片段
我正在关注这些文档:https ://developers.google.com/youtube/v3/docs/activities/insert