In this paper, in order to avoid the cascading failure by increasing the number of links in the physical network in D2D-based SNS, we propose an autonomous device placement algorithm. In this method, some relay devices are placed so as to increase the number of links in the physical network. Here, relay devices can be used only for relaying data and those are not SNS users. For example, unmanned aerial vehicles (UAV) with D2D communication capability and base stations with D2D communication capability are used as the relay devices. In the proposed method, at first, an optimization problem for minimizing node resilience which is a performance metric in order to place relay devices. Then, we investigate how relay devices should be placed based on some approximate optimal solutions. From this investigation, we propose an autonomous relay device placement in the physical network. In our proposed algorithm, relay devices can be placed without the complete information on network topology. We evaluate the performance of the proposed method with simulation, and investigate the effectiveness of the proposed method. From numerical examples, we show the effectiveness of our proposed algorithm.