It’s not that I’m logged on to Facebook; it’s that there is a browser cookie or something somewhere that Facebook checks when I go to a link at Facebook, that Facebook consults when deciding what to show. Since it’s a link to share something on Facebook, the code of that browser page checks the cookie to see if the browser has stored your Facebook login credentials.
If it doesn’t find a Facebook login, then it has to ask you to login or create an account to share the link on Facebook.
If I log in using a web browser with which I have never used Facebook before, then Facebook fails to find that info, so it redirects me to its login page:
“Log in to use your Facebook account with The New York Times.”