2014-09-23 2 views
0

나는 flickr 기능을 공유하기 위해 https://github.com/lukhnos/objectiveflickr을 따르고 있습니다.iOS를 통해 flickr에서 비디오 샤이닝

도서관은 플리커에 입력 스트림을 전송하는 방법이 있습니다

NSInputStream *imageStream = [NSInputStream inputStreamWithData:imageData]; 
[request uploadImageStream:imageStream suggestedFilename:@"Foobar.jpg" MIMEType:@"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"0", @"is_public", nil]]; 

을 NSData가 전송되기 때문에, 나는 MIME 타입이 일을 할 것입니다 변화라고 생각한다. 나는 인증 과정에서 유효하지 않은 서명 문제에 봉착하고 그것을 직접 확인할 수는 없지만 어떻게 든 해결할 것이다. 지금 나는 단지 내가 flickr에서 비디오를 공유하고 싶다는 것을 알고 싶었습니다. 그게 가능한가?

답변

0

예, ObjectiveFlickr 라이브러리를 통해 flickr에서 비디오를 공유 할 수 있습니다.

NSInputStream *imageStream = [NSInputStream inputStreamWithData:[NSData dataWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"small" ofType:@"mp4"]]]]; 

    [self.flickrRequest uploadImageStream:imageStream suggestedFilename:@"Foobar1.mp4" MIMEType:@"video/mp4" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"1", @"is_public", nil]]; 

MIMEType을 변경하면 NSData에 이미지 파일 대신 비디오가 있어야합니다.

아래에 업로드 된 파일의 양을 알려주는 파일이 업로드 될 때 대리인이 호출됩니다.

- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest imageUploadSentBytes:(NSUInteger)inSentBytes totalBytes:(NSUInteger)inTotalBytes 
{ 
    NSLog(@"Sent - %u, Total - %u", inSentBytes, inTotalBytes); 
} 
관련 문제