A more detailed tutorial is provided by @Morderi (thank you!):
- Make sure your facebook app is deleted
- Install the latest mod version
- Click on New Game button in settings and reset your progress
- Immediately close the game
- Delete the modded app and install 5.2.2 signed version
- This time you should have a "Later" option when it asks you to upgrade the game
- Log in to your facebook
- Without deleting 5.2.2 version, upgrade to the latest mod version.