这段代码几天前对我很有用。但现在我得到了
无法完成操作。 (com.facebook.sdk错误5.)
错误但视频已成功上传。以前有人遇到过这个问题吗?这可能是什么问题?
我的代码是
NSData *videoData = [NSData dataWithContentsOfFile:video_file_location];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
videoData, _videoFileName],
@"video/quicktime", @"contentType",
@"iOS app title", @"title",
@"my description", @"description",
nil];
[FBRequestConnection
startWithGraphPath:@"me/videos"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
NSLog(@"FB error - %@", [error localizedDescription]);
}];
我获得了
的许可[FBSession openActiveSessionWithPublishPermissions:[[NSArray alloc] initWithObjects:@"publish_stream", nil]
defaultAudience:FBSessionDefaultAudienceFriends
allowLoginUI:YES
completionHandler:^(FBSession *session,
FBSessionState state, NSError *error) {
[self sessionStateChanged:session state:state error:error];
}];
非常感谢任何反馈。
答案 0 :(得分:2)