I ran into this issue when our integration tests logged in with a test user – the following JSON came back from the Graph API:
{
"error": {
"message": "The access token is invalid since the user hasn't engaged the app in longer than 90 days.",
"type": "OAuthException",
"code": 190,
"error_subcode": 493,
"fbtrace_id": "F/1z2AsTRx8"
},
"timestamp_microsecond": "2018-05-30 11:22:01.353949"
}
That was a bigger problem as our test users don’t “engage” with the app as such. To fix this I had to:
- Log into the FB developer site
- Find the app in question
- Look under Roles -> Test Users to find the right user
- Click on the Edit button for the user and then click “Login as this test user”
- Once I’d logged in, go to Settings -> Apps & Websites
- Find the App in the “Expired” tab for apps the user had not interacted with for longer than 90 days
- Click the “View & Edit” button on the expired app
- Click “Renew Access” in the popup
Once I’d done all those steps my test user (and integration tests) worked again.