Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram iOS API to Post Video [closed]

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?

like image 786
loretoparisi Avatar asked Sep 12 '14 20:09

loretoparisi


1 Answers

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];
}
like image 57
loretoparisi Avatar answered Oct 19 '22 17:10

loretoparisi