It´s not possible to do that, for very good reasons. You need to use an App and implement login: https://developers.facebook.com/docs/facebook-login/v2.3
You can´t just store username and password and auto-login with a PHP script.
1
solved log into Facebook directly through a php script