On the IoT-based sensor networks, users or sensor nodes must perform a Service Discovery (SD) procedure before access to the wanted service. Current approach uses a center-concentrated Resource Directory (RD) servers or P2P technique, but these can cause a point-of-failure or flooding of SD messages. In this paper, we proposes an improved SWoT SD approach for CoAP-based sensor networks, which integrates Social Web of Things (SWoT) concept to current CoAP-based SD approach that makes up for weak points of existing systems. This new approach can perform a function like a keyword or location-based search originated from SNS, which can enhances the usability. Finally, we implemented a real system to evaluate.