Skip to content

Instantly share code, notes, and snippets.



Created Nov 21, 2012
What would you like to do?
FB upload example
-(void) uploadVideo {
NSMutableDictionary *fbParams = @{@"title": @"Video Title",
@"description": @"Video Description",
@"json", @"format"};
FBVideoUpload *faceBookVideoUpload = [[FBVideoUpload alloc] init];
faceBookVideoUpload.apiKey = APP_KEY;
faceBookVideoUpload.appSecret = APP_SECRET;
faceBookVideoUpload.accessToken = accessToken;
[faceBookVideoUpload startUploadWithURL:videoURL fbParams delegate:self];
// ------------------------------------------------------------------------------------
- (void) startUploadWithURL: (NSURL*) movieURL
params: (NSDictionary*) userParams
delegate: (id <FBRequestDelegate>) delegate
NSString* requestURL = [NSString stringWithFormat:@"", accessToken];
NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys:accessToken, @"access_token",
[userParams objectForKey:@"title"], @"title",
[userParams objectForKey:@"description"], @"description",
@"", @"file",
[NSData dataWithContentsOfURL:movieURL], @"", nil];
[[FBRequest getRequestWithParams:[params mutableCopy] httpMethod:@"POST" delegate:delegate requestURL:requestURL] connect];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.