-1

I'm trying to set up an instagram hashtag posts block for my site by js.

I know I need to use the Instagram Graph API API and get a Access Token to send the request. But it expires after 1 hour and I don't want to have to manually refresh it. Does anyone know a good, preferably free, way of doing this automatically or get the Long-Lived Access Token for this case?

Any ideas or links would be really helpful, thanks!

A solution or a video tutorial

1 Answers1

0

you can use this endpoint:

https://graph.facebook.com/{graph-api-version}/oauth/access_token?grant_type=fb_exchange_token&client_id={app_id}&client_secret={app_secret}&fb_exchange_token={your_short_time_access_token}

it returns a long live token. (It expires after 60 days)

Bushmaster
  • 4,196
  • 3
  • 8
  • 28