I'd say that's unprofessional of the teacher to be saying/doing. I have a few former instructors on my FB but they were all really nice and it didn’t bug me one bit. I’ve made the mistake before of lying to an instructor stating that I was “sick” when in fact I wasn’t, I said that so I can have an excused absence but took the day off to go skiing with cousins who were in town visiting.
This was a small class (and a culinary one) so therefore they're really strict about how many class days you can miss before your letter grade slips. I also forgot that I had friends on FB FROM THAT CLASS that saw that I was tagged in photos from that day, so the next day I came back I heard nonstop the whole entire fucking time of "yeah you were sick alright" "well if you didn't miss class yesterday you would've known" I swear to God it still lights a fire under my ass to this day.