To prevent your facebook or other online accounts from being hacked you should use a really strong password and then change that password at least every 6 months to a year.
Changing the password often will help prevent hackers from getting into your facebook and other online accounts.