Check if 'facebook' attribute exists before using it