Posting image to Instagram

Hey guys,

Just wondering if anyone has come across this and managed to find a way of getting it working.

As per the Instagram hooks (http://instagram.com/developer/iphone-hooks/), we can navigate to the app via Coronas system.openUrl(…), but I’m drawing a blank when it comes to the document identifier in order to actually load the image in. 

There are a fair amount of examples of doing this with Objective-C using the UIDocumentInteractionController. But I don’t know how to do this through Corona, or if it’s even possible.

Here is an example of how the request works in Obj C:

http://stackoverflow.com/questions/12631466/uidocumentinteractioncontroller-no-longer-works-in-ios6

Any thoughts on this would be greatly appreciated.

Thanks

Does anyone have any thoughts at all on this? I’m still struggling to get it working.

Does anyone have any thoughts at all on this? I’m still struggling to get it working.

hi, I looked into this a bit. We would normally use a REST API to hook up our Corona apps to Instagram. They do have such an API and we can use network.request to post to it…but here http://instagram.com/developer/endpoints/media/ they say that they don’t allow posting via their REST API:

At this time, uploading via the API is not possible. We made a conscious choice not to add this for the following reasons:

  1. Instagram is about your life on the go – we hope to encourage photos from within the app. However, in the future we may give whitelist access to individual apps on a case by case basis.
  2. We want to fight spam & low quality photos. Once we allow uploading from other sources, it’s harder to control what comes into the Instagram ecosystem. All this being said, we’re working on ways to ensure users have a consistent and high-quality experience on our platform.

Might be worth contacting them to see if we can whitelist a project, tho…let me know if you get something working!

hi, I looked into this a bit. We would normally use a REST API to hook up our Corona apps to Instagram. They do have such an API and we can use network.request to post to it…but here http://instagram.com/developer/endpoints/media/ they say that they don’t allow posting via their REST API:

At this time, uploading via the API is not possible. We made a conscious choice not to add this for the following reasons:

  1. Instagram is about your life on the go – we hope to encourage photos from within the app. However, in the future we may give whitelist access to individual apps on a case by case basis.
  2. We want to fight spam & low quality photos. Once we allow uploading from other sources, it’s harder to control what comes into the Instagram ecosystem. All this being said, we’re working on ways to ensure users have a consistent and high-quality experience on our platform.

Might be worth contacting them to see if we can whitelist a project, tho…let me know if you get something working!

Damn!! Well, I guess a work around is to download an image (or save it to the camera roll) and then launch the Instagram app and then manually select the image from the camera roll from Instagram? Kinda kludgy. Meh… Wonder if Instagram was always so stodgy or if that was only after Facebook bought 'em? :wink:

-Mario

Damn!! Well, I guess a work around is to download an image (or save it to the camera roll) and then launch the Instagram app and then manually select the image from the camera roll from Instagram? Kinda kludgy. Meh… Wonder if Instagram was always so stodgy or if that was only after Facebook bought 'em? :wink:

-Mario

I’m wondering if using URL Scheme should do the job…

http://instagram.com/developer/iphone-hooks/#

I ended up having to write a module to handle it which wasn’t too complicated. Of course it did mean dealing with Obj-C which is an offence to the eyeballs…

I’m wondering if using URL Scheme should do the job…

http://instagram.com/developer/iphone-hooks/#

I ended up having to write a module to handle it which wasn’t too complicated. Of course it did mean dealing with Obj-C which is an offence to the eyeballs…

@Tim

any chance you want to share this module :slight_smile:

@Tim

any chance you want to share this module :slight_smile: