A location-based social network is a network representation of social relations among actors, which not only allow them to connect to other users/friends but also they can share and access their physical locations. Here, the physical location consists of the instant location of an individual at a given timestamp and the location history that an individual has accumulated in a certain period. This paper aimed to capture this spatiotemporal social network (STS) data of location-based social networks and model it. In this paper, we propose a STS data model which captures both non-spatial and spatial properties of moving users, connected on social network. In our model, we define data types and operations that make querying spatiotemporal social network data easy and efficient. We extend spatiotemporal data model for moving objects proposed in Ferreira et al. (Trans GIS 18(2):253–269, 2014) for social networks. The data model infers individual’s location history and helps in querying social network users for their spatiotemporal locations, social links, influences, their common interests, behavior, activities, etc. We show the some results of applying our data model on a spatiotemporal dataset (GeoLife) and two large real-life spatiotemporal social network datasets (Gowalla, Brightkite) collected over a period of two years. We apply the proposed model to determine interesting locations in the city and correlate the impact of social network relationships on the spatiotemporal behavior of the users.