The fan is probably wobbling because the electrical box that it’s attached to isn’t secured tightly to the house’s framing members. You need to take the fan down and re-install it after securing the electrical box to a 2-by-4 brace fastened securely to the ceiling joists.