'What is the best way of getting an Instagram feeds in React?

I am displaying Instagram posts in react app. What is the best method to display Instagram posts?

  1. using "Access Token"
  2. or by creating access-token using app id and app secret key.

I am using option 1, I have created setting page where "Access Token" is saved and on the basis of token I am displaying the posts on different section. But problem is access token is expired after every 60 days. Inside settings there is no validation for access token. So in this case do I need to refresh the token.

Please suggest what is the best way to get Instagram posts, directly using "Access Token" or by using "App Id" and "Secret Key"



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source