-2
我正嘗試在Twitter上上傳視頻。我使用下面的代碼:用Twitter4J分塊上傳媒體
private UploadedMedia uploadMediaChunkedInit(long size) throws TwitterException {
return new UploadedMedia(post(
conf.getUploadBaseURL() + "media/upload.json",
new HttpParameter[] { new HttpParameter("command", CHUNKED_INIT),
new HttpParameter("media_type", "video/mp4"),
new HttpParameter("total_bytes", size) }).asJSONObject());
}
當我收到以下錯誤:
Method post is not defined
我從這裏驗證碼:
https://github.com/yusuke/twitter4j/pull/226/commits/73b43c1ae4511d3712118f61f983bcbca4ef0c59