开发者

Can I upload video to Facebook from within an iPhone application?

In the past, I've been able to upload images and text to Facebook from within my iPhone application, but I have not been able to upload vid开发者_StackOverfloweo. Does anyone know how to programmatically upload video to Facebook?


You appear to be able to make a facebook.video.upload FBRequest call, similar to how photos are uploaded.


Here is sample for photo upload, I guess similar with video, but seems like more limitation for video.

UIImage *img1 = [UIImage imageNamed:@"me.png"]; 


  NSMutableDictionary * params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                  img1, @"picture",
                                  nil];

  [_facebook requestWithMethodName: @"photos.upload" 
                         andParams: params1
                     andHttpMethod: @"POST" 
                       andDelegate: self]; 


Working implementation using TheRonin's answer and the link to Zoul's code on Github can be found here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜