How to automate the Facebook login without hard-coding my username and password?
You should use Facebook OAuth API, never hard-code password, some references:
Facebook SDK for Python
Python Social Auth documentation
Facebook OAuth 2 Tutorial