Talking to a Center or Approach controller on flight following does not necessarily satisfy the requirement for communication with the controlling agency: the Class D tower. However, the Controller's handbook says a pilot is not expected to obtain their own clearance through a Class C or D while receiving advisories.