Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getMediaFeedByLocation returns undefined with valid locationId #24

Closed
sebnun opened this issue Mar 29, 2018 · 2 comments
Closed

getMediaFeedByLocation returns undefined with valid locationId #24

sebnun opened this issue Mar 29, 2018 · 2 comments

Comments

@sebnun
Copy link
Contributor

sebnun commented Mar 29, 2018

Example:

const testLocationId = '234604984'
const feed = await client.getMediaFeedByLocation({ locationId: testLocationId })

feed is undefined

I'm using v1.1.0, this was working a couple of days ago, maybe this was a change on Instagram?
The URL https://www.instagram.com/explore/locations/234604984/ is also valid

@sebnun
Copy link
Contributor Author

sebnun commented Mar 29, 2018

it seems the JSON was changed on the instagram side,

Instead of

  getMediaFeedByLocation({ locationId }) {
    return this.request(`/explore/locations/${locationId}/?__a=1`).then(
      data => data.location
    )
  }

it should be:

  getMediaFeedByLocation({ locationId }) {
    return this.request(`/explore/locations/${locationId}/?__a=1`).then(
      data => data.graphql.location
    )
  }

@sebnun
Copy link
Contributor Author

sebnun commented Mar 29, 2018

made pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant