开发者

Post video using Facebook Graph API [duplicate]

This question already has answers here: 开发者_如何学C Closed 11 years ago.

Possible Duplicate:

iPhone Facebook Video Upload

I have to capture a video from my iphone and using Facebook Graph API I have to post video on my facebook wall. I know how the things are done with image uploading process. But I am facing problem with video.

Thanks

Tariq


It works for me.

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜