Search code examples
jsonswiftinstagraminstagram-apiapple-maps

Questions on Instagram API changes for use with Swift 3. Latitude and Longitude, search by #hastag


I'm updating an older Instagram Swift app. I'm now in Sandbox mode, and only able to access my own last 20 images, kind of in the dark on how this will work in the real-word.

  1. If I OAuth2 a user, can they then search by any hash tag?
  2. I'm not seeing any latitude or longitude values for my images in the sandbox, in the past, could easily get to that JSON data. Is that still possible or this is just a "Sandbox" limitation and will be able to access those values in the live app?

Example of what I like my Swift App to do:

A user wants to search by a any hash tag, lets say #paris. That will return a array of images tagged #paris. They then can click an image, and the location (latitude and longitude) will be available, would like to display the location of the image with a pin on an Apple map. All this was super easy to do before the "Sandbox" feature was turned on.

Are these features still available with the latest Instagram changes to their API? I'm assuming they want developers to spread the world, and not flee to Snapchat.

thanks for input. :-)


Solution

  • In Instagram sandbox mode, you can only access up to 10 authorized sandbox users. To add authorized sandbox users, you'll have to invite them to your app and they will have to accept the invitation.

    You can always request any endpoint when using this sandbox mode, but it will only resulted in 20 recent media of each authorized sandbox users. That is also the reason why you can only access your 20 last images.

    I can't answer for your disappearance of lat and long data. It should give the data nonetheless.

    source: https://www.instagram.com/developer/sandbox/