Unfortunately, if you had to do a factory reset, all data you had would be lost that was stored on your phone. Only the data that is stored on the game/Facebook servers gets saved for you. Everything you get when you are connected and saving progress, your gold bars, etc. The rest is saved per device and available for you to play offline. Been there!