You can say both but the nuances are a bit different because of the slightly different meanings. We usually use like to do something when we mean that we like the effect of doing it, or we think it is a good idea to do this thing because of its wider effects:
- I like to havego to the dentist if my cavities drilled and filled with amalgamfilling needs replacing.
This would imply that it's a sensible thing to do. In contrast, we usually use like doing something when we find the experience itself pleasurable or enjoyable. Consider this version of the sentence:
- I like havinggoing to the dentist if my cavities drilled and filled with amalgamfilling needs replacing.
This would tend to imply that you were a bit of a masochist! Nonetheless, most of the time there will be little discernible difference in everyday speech. Both of your comments to each other were very complimentary!