For our Facebook App, we have followed the below URL for getting access tokens for Instagram Business User/Creator
https://developers.facebook.com/docs/instagram/business-login-for-instagram/
After getting a short lived token, we exchanged that for a long lived token. The token debugger tool as well as token debug api shows Expires value for these tokens as 0 (Never).
However we have a substantial quantity of users for which when we are trying to query the Media, we are getting the following error (Around 10% of our connected Users)
"Error validating access token: The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons."
Is it possible that 10% of our users (around 700-800) could have changed their Instagram password ?
The long lived token documentation says that :
"When you use the iOS, Android, or JavaScript SDK, the SDK will automatically refresh tokens if the person has used your app within the last 90 days. Native mobile apps using Facebook's SDKs get long-lived User access tokens, good for about 60 days. These tokens are refreshed once per day, when the person using your app makes a request to Facebook's servers. If no requests are made, the token will expire after about 60 days and the person will have to go through the login flow again to get a new token."
We are not using any SDK. Neither for authentication, nor for fetching Media. Mostly communicating with Facebook using REST API to graph.facebook.com utilizing the access_token.
The login flow is standard through our React App. No SDK. Just JS and URL redirect and stuff.
"These tokens are refreshed once per day, when the person using your app makes a request to Facebook's servers".
What does the above statement mean ?
If I make a call to Facebook Graph API (through REST API) using stored user Access token to fetch media, once every 90 days, does that satisfy above requirement ?
Do I need to use any SDK (JS/Python) to fetch Media, once every 90 days ?

Tag:-

Add a new comment.