## 1 Introduction
This can be concluded looking at the variety of social networks currently available (e.g., _Twitter_, _Facebook_, _Instagram_, _LinkedIn_ and many others). Roughly speaking, social media can be defined as a network of interactions of relationships, where the nodes are actors or entities and the edges represent the relationship among them [10]. These interactions contain textual information about everyday events, such as wedding information, sports news or descriptions of a car accident. They may also have spatial information, due to the GPS (Global Positioning System) unit built in recent mobile devices [11]. Finally, temporal information is also present, since the time in which the information is sent is also stored. Analyzing the data contained in interactions, events of interest may be detected, classified and associated to a specific region, providing textual (what happened), temporal (when it happened) and spatial (where it happened) information. According to [12], when these data are efficiently indexed, they can be retrieved in a short amount of time and used in location-based applications. When people spontaneously post information in social networks about a specific event (e.g., car accident, fire, and robbery), that event could be detected, classified (in a numerical scale of relevance indexes) and associated to sensors inside the region of influence of the event. Sensors in that area may then optimize their operation, for example tagging transmitted packets or changing sensing and coding behavior [13; 14]. The efficient detection and classification of events, as well as the proper assignment of sensing priorities to sensor nodes, may open new possibilities for Smart Cities applications, and this promising scenario fostered the development of this work. This article then proposes a new approach, TwitterSensing, as an external system to be employed in Smart City scenarios, providing a new mechanism to establish sensing priorities to sensor nodes in one or more wireless sensor networks. In short, the contributions of this work are threefold. First, _Twitter_ is exploited to provide information about the current events that are happening in any considered city, which is cheaper and simpler than other mechanisms since it only relies on the natural behavior of an arbitrary group of inhabitants in modern cities. Second, a computational approach is proposed and implemented to detect events of interest and to classify them in a numerical scale of relevance. Third, an algorithm and a specialized protocol are designed to establish the computed priorities to the corresponding sensors in the region of influence of the detected events. The proposed approach will extract information from data flows provided by the _Twitter_ database, processing them to detect and classify events of interest, as well as to locate them on predefined urban areas (influence regions of the events). The established priorities may then be exploited for any kind of optimization, but the definition of the optimization approaches is out of the scope of this work. Actually, this innovative approach may considerably optimize WSN for higher performance and reduce costs, since event detection will be performed exploiting information already present on Internet and spontaneously produced by inhabitants of the city. To the best of our knowledge, such approach has not been proposed before. The conceptual data flow of the overall solution is depicted in Figure 1.  
The remainder of this paper is organized as follows. Section 2 presents the state of the art in areas related to this work. Fundamental definitions are described in Section 3. Section 4 presents the proposed approach. Numerical results are described in Section 5, followed by conclusions and references.