我正在使用 facebook sdk 上传视频,但我无法在 facebook 上上传超过 60MB 的视频。我也尝试了很多使用 NSInputStream 来发送数据和所有:-
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mov"];
NSData *videoData = [NSData dataWithContentsOfFile:filePath];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
videoData, @"video.mov",
@"video/quicktime", @"contentType",
@"Video Test Title", @"title",
@"Video Test Description", @"description",
nil];
FBRequest *request = [FBRequest requestWithGraphPath:@"me/videos" parameters:params HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
NSLog(@"result: %@, error: %@", result, error);
}];