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

Discussion: Deprecation of the Instagram legacy API #131

Closed
timrodz opened this issue Mar 4, 2020 · 7 comments
Closed

Discussion: Deprecation of the Instagram legacy API #131

timrodz opened this issue Mar 4, 2020 · 7 comments

Comments

@timrodz
Copy link

timrodz commented Mar 4, 2020

I found out that Instagram is deprecating their legacy API on March 31, 2020. Would this affect how this plugin works?

If so, looks like we'll have to migrate to the Basic Display API. The User Token Generator generates a token that is valid for 60 days before having to be refreshed, and can only be used with accounts you know the credentials to.

@oorestisime
Copy link
Owner

The plugin is using the graph api when provided with a token so i think that this deprecation is ok for the plugin.
I am not sure whether they will change anything for the public scraping. I ll keep a close eye on that during that day.

Btw if you want to generate a token here's a how to https://github.com/oorestisime/gatsby-source-instagram#instagram-graph-api-token

@timrodz
Copy link
Author

timrodz commented Mar 5, 2020

Thanks for the heads up @oorestisime. I think it might affect the public scraping part.

I'm working on this gatsby starter. If I keep using this plugin, what do you think will be the steps for setting up with the new graph API?

Currently, my setup on gatsby-config.js is meant to work publicly:

{
  resolve: `gatsby-source-instagram`,
  options: {
    username: config.social.instagram,
  },
}

@oorestisime
Copy link
Owner

Unfrotunately i won't be able to predict those changes so maybe we will have some issues that day. hopefully not!

As for the graph api i sent you above the way to get a token. Once you get what you need you can configure it in a similar manner as i do in the example:
https://github.com/oorestisime/gatsby-source-instagram/blob/master/example/gatsby-config.js#L16-L22

@timrodz
Copy link
Author

timrodz commented Mar 5, 2020

Cheers for the link!

@redraw
Copy link

redraw commented Mar 24, 2020

This doesn't seem to be official, but it has been working for a long time, and data is public anyway.

If you append ?__a=1 to any profile/hashtag page you'll get a graphql JSON response.

@oorestisime
Copy link
Owner

ha interesting, hope to have some time in the following days to do this then. unless you want to PR :)

@oorestisime
Copy link
Owner

I am closing this issue since it hasn't impacted anything on the plugin

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

3 participants