AnderGoig / SwiftInstagram

Instagram API client written in Swift
https://git.io/vdNAn
MIT License
578 stars 81 forks source link

Invalid Media ID #21

Closed black-lotus closed 6 years ago

black-lotus commented 6 years ago

Checklist

Expected Behavior

I should get Media data as Instagram Documentation like this Instagram media

Actual Behavior

I have already Authentication then get media data Auth -> Fetch Data (Media) but i got an error like this [invalidRequest] - invalid media id

Steps to Reproduce the Problem

  1. Auth
  2. Fetch with this shortcode Ba6NSWUFLfj

Specifications

AnderGoig commented 6 years ago

Hi @black-lotus, there are two methods to fetch a media object:

media(id: <your media id>, ...) and media(shortcode: <your media shortcode>, ...)

Which one are you using?

black-lotus commented 6 years ago

I am using shortcode since i have only shortcode url media(shortcode: <your media shortcode>, ...)

AnderGoig commented 6 years ago

Hi @black-lotus, sorry for the late response. I've been testing it and I found something interesting. It seems that when you are in sandbox mode, the data that Instagram API handles is restricted to the 20 most recent media. Also the media must be from users inside the sandbox. I've tried with this conditions and works.

Hope it helps you! 🤞