我正在尝试在Twitter上传视频。我使用以下代码:
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());
}
我收到以下错误:
未定义方法帖子
我从这里得到了这段代码:
https://github.com/yusuke/twitter4j/pull/226/commits/73b43c1ae4511d3712118f61f983bcbca4ef0c59