General traffic analysis based on Deep Packet Inspection (DPI) techniques at the gateways or access points cannot grasp the detailed knowledge of network applications going among internal nodes, and the statistics-based reports of routers are also lack of flow-level recognition of the traffic in the form of only five tuple. Therefore, network-wise accurate flow-awareness by packet sampling is highly desired for fine-grained quality of service guarantee, internal network management, traffic engineering, and security analysis and so on. In this paper, we propose a Spatio-Temporal Collaborative Sampling (STCS) problem based on the Software-Defined Networking (SDN) technique. The goal of STCS is to maximize the network-wise sampling accuracy of both elephant and mice flows, which considers both of the comprehensive influences of nodes and the effect on sampling accuracy imposed by the collaborative strategy among nodes in the time dimension. We present a approach to calculate the near optimal solution of STCS in two steps: 1) Top-K nodes selection by iterative comprehensive influence, and 2) spatio-temporal co-sampling solution based on the local value maximization strategy. We evaluate the proposed approach by a realistic large-scale topology, and the results show that the sampling accuracy can be effectively improved by the method, especially for mice flows, and the redundant ratio of sampled packets is reduced by 34.4%.