How can I make a Python script which checks if I have logged in the Facebook? If I haven't, it should log me in.
Being "logged in" to Facebook (or any system for that matter) is generally a contract between the server and the client - and not just a "flipped bit" on the server.
As an example, if you log into Facebook on you phone - you can't then pull up Facebook on your desktop machine and be logged in.
In short - no, I don't think so.
Python Facebook login