I fixed the issue by deleting the cache of the app inside the game.
The issue now is that I cannot log in with my main account. Everytime I try to connect with Facebook from browser, I get black screen and after pressing back, it says that the log in failed. When I try to log in using the Facebook app, it gives error when trying to log in with the mod game, but it works using the normal app, so I don't know what to do. I seem to be unable to log in with my main account on the modded game now.
Most likely everyone already solved the issue, but I will put the steps anyway.
If you get the niffler error when connecting to the game:
1- Delete the game.
2- Install the 5.2.2 version (it can be seen in the original post of this thread).
3- Inside the settings of the app (inside the game), delete the cache of the game.
4- Log in with your Facebook account
without the Facebook app (use any browser).
5- Close the app (do not uninstall it).
6- Install the most recent version of the app (currently 5.7.0). It should install as an update, so the old app is updated and the account will stay there.
If everything goes well, the game should open without the niffler error and your account should keep everything it had! At least, this fixed the problem to me.