0

I am following https://github.com/lukhnos/objectiveflickr to achieve the sharing on flickr functionlity.

The Library has methods to send input stream to flickr:

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

Since NSData is sent, I think changing the MIMEType will do the job. I am stuck with the invalid signature problem on the authentication process and cannot check it myself, but will solve it somehow. For now I just wanted to know that If I want to share video on flickr. Is that even possible?

nr5
  • 4,228
  • 8
  • 42
  • 82

1 Answers1

0

Yes it its possible to share the video on flickr via the ObjectiveFlickr Library.

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]];

Just need to change the MIMEType and NSData should contain a video instead of an image file.

Below delegate will get called as the file is being uploaded, informing how much bytes have been uploaded.

- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest imageUploadSentBytes:(NSUInteger)inSentBytes totalBytes:(NSUInteger)inTotalBytes
{
    NSLog(@"Sent - %u, Total - %u", inSentBytes, inTotalBytes);
}
nr5
  • 4,228
  • 8
  • 42
  • 82