The below code is what you're looking for:
$providerUserId = JFBCFactory::provider('facebook')->getMappedUserId();That will return null if the user isn't mapped to the selected network or will return the unique ID for the social network for that user.
I hope that helps, but if you have any other questions, just let me know.
Thanks,
Alex