Facebook login suddenly stopped working “Authentication failed! Facebook returned an invalid user id.”

We had a working FB login integration done via hybridauth version 2.7 for a php2 website and it suddenly started giving the error:

Authentication failed! Facebook returned an invalid user id.