SOLVED: Instagram feed stopped working

I’ve had the feed running on a site since October. The feed has stopped showing and it’s giving me the error message Failed to fetch Instagram posts.

The access token is still in place. I can’t find any posts about the error message and why it’s failed.

Help appreciated.

1 Like

Hi @amandav,

Could you please share temporary admin access to help@bricksbuilder.io with a link to this thread so we can investigate?

Hi, exactly the same error at me. Token is on the place but “Failed to fetch Instagram posts.” at backend. Nothing changed at site from where the feed was working.

Hi @pesiiin,

It could be any number of reasons so could you please share temporary admin access to help@bricksbuilder.io with a link to this thread so we can investigate?

Hi @amandav,

Thank you for sharing access. It looks like the issue is with your Instagram token, which has expired. The error from the Instagram API was “Error validating access token: Session has expired on Saturday, 25-Nov-23 21:56:24 PST.”

To fix this, you’ll need a new token. Here’s a guide on how to get one: How to get your Instagram Access Token – Bricks Academy.

We’ve set up an automatic refresh for the token in Bricks, but it might not run if your site doesn’t get enough visitors. To ensure it works consistently, consider setting up a real CRON job. If you need guidance on this, just search “How to replace the WordPress CRON with a real CRON job” — there are plenty of helpful resources available.

Feel free to reach out if you have any more questions.


@pesiiin It sounds like you might be experiencing the same issue with the “Failed to fetch Instagram posts” error. The token might have expired for you as well. I’d suggest generating a new one using the guide above. Also, ensure your CRON job is set up correctly to avoid similar issues in the future. Let us know how it goes or if you need any further help!

email was send to help adress :wink:

1 Like

Hi @pesiiin,

Thank you for sharing access. Yup looks like you have the same issue as Amanda. The response is “Error validating access token: Session has expired on Monday, 01-Jan-24 12:26:35 PST.”

So the advice I shared above of setting up a real CRON & getting a new token manually applies to your use case too.

Thank you for checking this out.
It seems Meta has updated their platform and other is not an option anymore.
The client alerted me to this when I asked them to go through the steps again for a new token.
It seems a user now has to select Consumer to follow the steps outlined in your documentation.

Also adding a user for testing is different. You might need to update the documentation.
I’ve attached some screenshots.


I’ve got it working when testing with my own accounts and I will pass the information onto the client. I will also look into the cron job. However, this website does get a lot of traffic.

Hi, where this can be see ? I looked at: wp-admin/tools.php?page=action-scheduler but there is no job for this…

Hi @amandav,

Meta might be doing some A/B testing at the moment but on my end I’m still able to select the “Other” category: :sweat_smile::

But thank you for sharing the steps you took maybe other users would face the same steps as you did.

We’re using the standard WordPress Cron system for this not Action Scheduler.

You can use a plugin like “WP Crontrol” to view the scheduled events.

The hook is called bricks_refresh_instagram_access_token and is scheduled to run monthly.

Hi, token expired again. So automatic refresher is not working. Can You test this ? There is manual daily CRON set on my clients site…

Same thing has happened on my site as well. I followed your suggestion and even tried to manually refresh token before expiry and it still looks like it’s expired. Feed is not showing.

Hi @pesiiin & @amandav,

I think I’m able to replicate this locally as well now. Could you please share temporary admin access to help@bricksbuilder.io with a link to this forum thread? I’ll investigate the issue further and upload a fix for you to test. A staging site is fine too.

Sorry I cant, coz its live clients website with Woo, so I cant risk anything. But If You describe where I can look for what…

1 Like

I’ve sent you an email.

1 Like

I understand, no worries, we’re just debugging the automatic token regeneration on different setups. Amanda already sent access details so that should suffice.

Hi @amandav & @pesiiin,

I was able to replicate the issue with automatic token regeneration and have created an internal ticket to address this. Thank you for your cooperation!

3 Likes

Hi, I see the event scheduled (bricks_refresh_instagram_access_token) but it’s not refreshing the token :frowning:
I see on Meta documentation that they say to use this command:

GET https://graph.instagram.com/refresh_access_token
  ?grant_type=ig_refresh_token
  &access_token={long-lived-access-token}

Can I just add my own event?
Thanks!

@pcomedy we’re currently working on a fix :slight_smile:

1 Like