0

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

Community
  • 1
  • 1
Tariq
  • 9,861
  • 12
  • 62
  • 103
  • yeah i will followup up there – Tariq Mar 23 '11 at 05:15
  • I too have been having problems with this. The issue is the current Facebook Graph API does not support video uploading and you must therefore revert to the older REST Api. For more information see my question here: http://stackoverflow.com/questions/5355846/iphone-facebook-video-upload. Cheers – Brenton Morse Mar 22 '11 at 16:37

1 Answers1

3

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];
Kegan Gan
  • 66
  • 8