如何在Facebook上恢复破损的视频上传

时间:2012-10-16 02:33:45

标签: iphone ios facebook video upload

我使用以下代码上传视频,这不是可恢复的上传。 如何在Facebook上恢复损坏的视频上传?

- (void)sendVideo{
    NSURL *requestUrl = [NSURL URLWithString:[NSString stringWithFormat:@"https://graph-video.facebook.com/videos?access_token=%@",self.fbAccessToken]];
    self.fbRequest = [ASIFormDataRequest requestWithURL:requestUrl];
    [self.fbRequest setTimeOutSeconds:60];
    self.fbRequest.uploadProgressDelegate = self;
    self.fbRequest.delegate = self;
    self.fbRequest.requestMethod = @"POST";
    [self.fbRequest setPostValue:item.title  forKey:@"name"];
    [self.fbRequest setPostValue:[item customValueForKey:@"status"]   forKey:@"description"];
    [self.fbRequest setFile:item.filePath forKey:@"source"];
    self.fbRequest.tag = RequestStepUpload;
    [self.fbRequest startAsynchronous]; 
}

1 个答案:

答案 0 :(得分:2)

无法恢复中断的上传。一旦连接丢失,Facebook就会转储收到的临时数据。他们只收到整个有效载荷后才处理视频。

当包含单个图表对象id的JSON对象作为您视频的引用时,上传过程中唯一来自Facebook的反馈即告完成。

连接中断或中断后,您需要重试。