Sorry the documentation is out of date. Can you tell me where you found that code? It is indeed old and we'd like to update it.
As to the actual question, to check if the current user is currently logged into Facebook, you can just use this code:
if (JFBCFactory::provider('facebook')->getProviderUserId() )You don't need to require any files first to use that. However, please be aware that will check if they are currently logged in to Facebook. If you want to check if they have linked their account to Facebook, but may just have logged in with their Joomla account currently, that would be different code.
I hope that helps get you going, but let us know if you need anything else.
Thanks,
Alex