Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios iphone hooks open instagram directly without showing UIDocumentInteractionController

I'm integrating sharing images through instagram in my app. I've read their documentation.

It seems that I need to use the iOS UIDocumentInteractionController to allow this (I understand that it allows access to files in my app's sandbox).

Digging deeper, I came across this library which makes things very straightforward.

The problem I have with it is that it presents the action sheet (which only has one button - Instagram...) How can I use the instagram hooks , with the UIDocumentInteractionController without showing the action sheet. I came across this question which is pretty much the same, but its outdated with no answer.

like image 855
Avner Barr Avatar asked May 20 '13 10:05

Avner Barr


1 Answers

I use a very simple share-open Instagram flow.

  • I save image locally to photos
  • Then I open Instagram with following URL: instagram://library?AssetPath=assets-library

This opens Instagram directly into photos library. Because photo was saved few moments ago, the new photo is visible as the first photo in library.

like image 71
sabiland Avatar answered Sep 19 '22 06:09

sabiland