Based on social media location data,this paper uses K-means clustering method to achieve the identification of urban functional areas in Shanghai by analyzing the change pattern of Tencent user density heat values at the grid scale of 500 m×500 m at different times in the city. The different areas of Shanghai are divided into industrial areas,urban residential areas,suburban residential areas,integrated urban functional areas,rural village areas,agricultural land,mudflat and unused land areas based on the functional area types. The feasibility of using social media location data for urban functional area identification is demonstrated by comparing and analyzing the identification results with high-resolution satellite images and point of interest(POI) data. The cost of data acquisition of this method is low. And it is easy to be used,which provides a new idea and methodology for the division of the main functional areas in other urban regions.