You can interact with people. Just don't tell someone you don't know that they should be smiling, when you have no idea why they might not be smiling.
Or, you know, you can if you want, but freedom of speech doesn't equal freedom of consequence, so if they don't like that you told them they should be smiling, then tough.
It’s a suggestion to smile in the form of a playful rhyme, its such an innocent thing to say on the scale of things, I don’t really see why anyone would think that’s such a negative thing to do