2012-06-22 100 views

回答

0

請查看這篇文章:How-To: Use the Graph API to Upload a Video (iOS)

- (void)fbDidLogin { 
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mov"]; 
    NSData *videoData = [NSData dataWithContentsOfFile:filePath]; 
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
            videoData, @"video.mov", 
            @"video/quicktime", @"contentType", 
            @"Video Test Title", @"title", 
            @"Video Test Description", @"description", 
         nil]; 
    [facebook requestWithGraphPath:@"me/videos" 
         andParams:params 
        andHttpMethod:@"POST" 
         andDelegate:self]; 
}