使用Facebook Graph API发布视频

时间:2011-03-22 09:43:21

标签: iphone facebook file-upload facebook-graph-api

  

可能重复:
  iPhone Facebook Video Upload

我必须从我的iphone捕获视频并使用Facebook Graph API我必须在我的Facebook墙上发布视频。我知道图像上传过程是如何完成的。但我面临视频问题。

由于

塔里克

1 个答案:

答案 0 :(得分:3)

它对我有用。

Facebook *facebook = ...;       // Facebook object.
NSString *videoFilePath = ...;  // File path to video file.

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:3L];

[params setObject:[NSData dataWithContentsOfFile:videoFilePath] forKey:@"video_filename.MOV"];
[params setObject:@"Title for this post." forKey:@"title"];
[params setObject:@"Description for this post." forKey:@"description"];

[facebook requestWithGraphPath:@"me/videos" andParams:params andHttpMethod:@"POST" andDelegate:self];