Is there any public API to post a video on Instagram?
We know that on iOS it is possibile to share an image (JPEG or PNG) using the iPhone Hooks via iOS Document Interaction. On Android it is possibile to share a video via Android Intent.
The iOS App Cinamatic is doing this after oAuth API, but according to Instagram API documentation there's no mention to a media object of type 'video'.
We also know that other apps, that are not using Instagram oAuth, will save a video in the Video Folder and then open the Instagram Camera via the mentioned iPhone Hooks, in order to let the user to open that video, but that it is not so smart.
So how Cinamatic is doing this using the API?
The undocumented Instagram Video Hook let you share videos to Instagram quite like the Camera Hook
URL: instagram://library
Path parameter: AssetPath
Comment parameter: InstagramCaption
and so you have something like
NSString *instagramURL = [NSString stringWithFormat:@"instagram://library?AssetPath=%@&InstagramCaption=%@",videoURL,[videocaption stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
[[UIApplication sharedApplication] openURL:instagramURL];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With