Side question: When I try to just log into the app with Instagram oauth (not involving the Google at all), there is no new user created under the “User” dataType. Anyone knows how to fix this bug?
Thanks, Jici! I’m following the steps to manually set up my Instagram Graph API, but I’m getting this state error (even though the url did also return with the authorization code):
{“statusCode”:400,“body”:{“status”:“ERROR”,“message”:“Missing state from oauth provider”}}
and when i added the state:
{“statusCode”:400,“body”:{“status”:“ERROR”,“message”:“Invalid state from oauth provider”}}
One follow-up question. I want to bulk update users’ social media data in the backend, but the Google token would expire after ~15 min (via the user-agent method).
Do you know if there is a way to maintain the authorization even when the user is offline?
for google you need to add access_type=offline to your authorization url. This will return a refresh token. You need to validate the access_token is expired before any request to Google API for this user. If expired, get a new access token with the refresh request process.