How to tell if user is logged in via facebook

I am wondering how i would go about testing if a user is logged in via facebook. Is there a simple function i can call?