【发布时间】:2012-12-09 06:41:27
【问题描述】:
由于 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"
}
}
}
}
部分是=sn-p
我正在关注这些文档:https://developers.google.com/youtube/v3/docs/activities/insert
【问题讨论】:
-
stackoverflow.com/questions/13460699/… .. 描述您需要传递哪些标头...
标签: php youtube youtube-api