You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building for my employer an Instagram fetch component on his website. The latest eight images of the company's Instagram profile are fetched and included on the website. As the whole website is a Gatsby project, I wanted to use the gatsby-source-instagram plugin.
Since a while, I get the warning: Could not get instagram posts using the Graph API. Error status Error: Request failed with status code 400. Then, it falls back to public scraping. So far, so good. When the website is built on Netlify, this fails. This is my error message: Could not get instagram posts using the Graph API. Error status Error: Request failed with status code 400 Falling back to public scraping... with (name of the profile) Could not fetch instagram posts. Error status TypeError: Cannot read property '0' of undefined The gatsby-source-instagram plugin has generated no Gatsby nodes. Do you need it? and later: error There was an error in your GraphQL query: Cannot query field "allInstaNode" on type "Query".
If I am right, fetching the posts fails for the Graph API request as well as for public scraping. Thus, allInstaNodes is not there and it fails on a server. Locally, only public scraping works.
This is my request: import { useStaticQuery, graphql } from "gatsby" export const useInstaNode = () => { const { allInstaNode } = useStaticQuery( graphql
query InstaPosts {
allInstaNode(filter: { mediaType: { eq: "GraphImage" } }, limit: 8) {
edges {
node {
id
mediaType
timestamp
caption
localFile {
childImageSharp {
fluid(maxWidth: 290) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
} ) return allInstaNode }
In my gatsby-config.js, I provided username, access_token, and instagram_id. gatsby-source-instagram is v0.7.0 and gatsby is v2.19.10. Can anybody help me that my request is working also on a server?
The text was updated successfully, but these errors were encountered:
I can check the token later. It was generated last year and as far as I know it never worked. We had always this issue with falling back to public scraping. Now, combined with the other error, this Instagram component stopped to work for new deploys.
I am building for my employer an Instagram fetch component on his website. The latest eight images of the company's Instagram profile are fetched and included on the website. As the whole website is a Gatsby project, I wanted to use the gatsby-source-instagram plugin.
Since a while, I get the warning: Could not get instagram posts using the Graph API. Error status Error: Request failed with status code 400. Then, it falls back to public scraping. So far, so good. When the website is built on Netlify, this fails. This is my error message:
Could not get instagram posts using the Graph API. Error status Error: Request failed with status code 400 Falling back to public scraping... with (name of the profile) Could not fetch instagram posts. Error status TypeError: Cannot read property '0' of undefined The gatsby-source-instagram plugin has generated no Gatsby nodes. Do you need it?
and later:error There was an error in your GraphQL query: Cannot query field "allInstaNode" on type "Query".
If I am right, fetching the posts fails for the Graph API request as well as for public scraping. Thus, allInstaNodes is not there and it fails on a server. Locally, only public scraping works.
This is my request:
import { useStaticQuery, graphql } from "gatsby" export const useInstaNode = () => { const { allInstaNode } = useStaticQuery( graphql
query InstaPosts {
allInstaNode(filter: { mediaType: { eq: "GraphImage" } }, limit: 8) {
edges {
node {
id
mediaType
timestamp
caption
localFile {
childImageSharp {
fluid(maxWidth: 290) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
}
) return allInstaNode }
In my gatsby-config.js, I provided username, access_token, and instagram_id. gatsby-source-instagram is v0.7.0 and gatsby is v2.19.10. Can anybody help me that my request is working also on a server?
The text was updated successfully, but these errors were encountered: