The main question is whether there is something that you can do for them as a politician. If you're involved in a committee hearing on some piece of legislation or something that will affect them, you'd better be careful. If, in fact, there's nothing between you and them in the way of business, there is no problem. People will make out of instances of people taking pictures together all sorts of inferences but, if there's nothing at stake, it's not a problem. My test is whether there is a situation of conflict of interest.
There's also the issue of old-time friends. Of course it's logical that you won't drop all your old-time friends. On the other hand, it's probably wise to be careful about what you're doing in a period of a year or two around some kind of important decision that you have to make in your professional job.
It's really fairly easy to decide whether there's something there that you shouldn't be letting them influence you on.