I can't speak for all photos - but I'm fairly certain those 3d looking photos on FB must be taken with with a stereoscopic camera (2+ lenses). They can calculate depth when they know the distance between the lenses (and differences in focal lengths, etc).
That isn't to say they couldn't do it retroactively for single lens photos, but I'm guessing not right now they're not.