you can set that through appropriate use of user permissions
ie you GRANT whatever permissions are needed.. look at the
MySQL manual for security permissions
however the most likely way they can be doing this is through SQL injection attacks, you need to make certain your code doesn't allow SQL injection attacks.. thats a coding issue, thats an issue specific to your application, hence why I suggest you investigate facebook application advice, something that I suspect is thin on the ground here