Can you get TB by drinking off someone's glass who has TB?

is that possible to just drink out of a glass that someone who had TB drank off of, then you will have TB? i mean is that really how it works?