【发布时间】:2014-06-19 14:57:49
【问题描述】:
到目前为止,我正在尝试使用 Youtube API 上传视频,但是当我尝试使用 cfhttp 传递 sn-p 和状态以开始可恢复上传时,虽然我得到了 200 ok 响应,但似乎没有 sn -p 参数导致视频没有合适的标题...
<cfset jsondet='{
"snippet": {
"title": "My video title",
"description": "This is a description of my video",
"tags": ["cool", "video", "more keywords"],
"categoryId": 22
},
"status": {
"privacyStatus": "private",
"embeddable": True,
"license": "youtube"
}
}'>
<cfhttp method="Post" url="https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable&part=snippet,status" >
<cfhttpparam type="header" value="Bearer #form.rectoken#" name="Authorization">
<cfhttpparam type="header" value="278" name="Content-Length">
<cfhttpparam type="header" value="application/json; charset=UTF-8" name="Content-Type">
<cfhttpparam type="header" value="3000000" name="X-Upload-Content-Length">
<cfhttpparam type="header" value="video/*" name="X-Upload-Content-Type">
<cfhttpparam type="body" value="#serializeJSON(jsondet)#">
</cfhttp>
有人有什么好主意吗?
【问题讨论】:
标签: coldfusion youtube-api google-oauth