0

I have to upload video on facebook using iphone sdk 4.0 or above.

Here is the code I am using:

FBRequest m_UploadRequest = [[FBRequest requestWithSession: _session delegate: self] retain]; 
NSURL *videoUrl=[NSURL URLWithString:@"clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"]; 
NSData VideoFileData = [NSData dataWithContentsOfURL:videoUrl]; 
NSMutableDictionary* Parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"video.upload", @"method", @"Video Title", @"title", nil]; 
[m_UploadRequest call: @"facebook.video.upload" params:Parameters dataParam: VideoFileData]; //not working...

Thanks in advance Pankaj

Chris Markle
  • 2,076
  • 4
  • 25
  • 46
Pankaj
  • 61
  • 8

2 Answers2

0

Step 1. Learn how to upload a video for the iPhone. Hint: Look into NSURLConnection and NSOperation. If you are really motivated take a look at ASIHTTPRequest.

Step 2. Learn how to use the Facebook API. Good luck here, their docs are terrible.

Step 3. Put your newfound knowledge to work and wire it all up together. Profit!

Genericrich
  • 4,611
  • 5
  • 36
  • 55
  • thanks my code is :-- FBRequest *m_UploadRequest = [[FBRequest requestWithSession: _session delegate: self] retain]; NSURL *videoUrl=[NSURL URLWithString:@"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"]; NSData* VideoFileData = [NSData dataWithContentsOfURL:videoUrl]; NSMutableDictionary* Parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"video.upload", @"method", @"Video Title", @"title", nil]; [m_UploadRequest call: @"facebook.video.upload" params:Parameters dataParam: VideoFileData];//not working. – Pankaj Oct 19 '10 at 09:30
0

in my case if am using this code then

[FBRequest requestWithSession:delegate:]: unrecognized selector sent to class 0x4b910

also check the related questions

Uplooad Video facebook-ios-sdk : uploaded but not shown on my FB Wall and in My Video

Facebook iOS Upload Video "Unable to retrieve session key from the access token."

Community
  • 1
  • 1
Amit Battan
  • 2,968
  • 2
  • 32
  • 68