Artificial intelligence (AI) on chips has recently driven the expansion of the Social Internet of Things (SIoT), where a group of SIoT devices with social relations can collaboratively identify and handle local events without the help of remote servers. On the other hand, mobile-edge computing (MEC) is a favorable way to locally process SIoT data for reducing data transmission and computation among SIoT devices and backhaul networks. Nevertheless, the load sharing among SIoT devices, MEC, and remote servers brings about new challenges for the communication and computation tradeoff, cross-layer design in SIoT, and forwarding and aggregation tradeoff. To tackle these issues, we formulate a new optimization problem, namely, SIoT collaborative group and device selection problem (SCGDSP), and prove the NP-hardness. We first explore the intrinsic properties of a fundamental SCGDSP case by finding the optimal collaborative group for each user request. Then, we design an approximation algorithm for the general SCGDSP that first evaluates candidate collaborative groups under different social relations, and then selects the collaborative groups and SIoT devices properly. For scalability, the proposed algorithm also supports dynamic user requests and can be distributionally deployed in massive networks enabling collaborative MEC. Moreover, it also sustains local SIoT services, where the computation only involves SIoT devices and MEC servers. Simulation results demonstrate that effective SIoT and collaborative group selection (ESCGS) can reduce by more than 50% of the total communication and computation costs compared with baseline schemes in the real networks from topology zoo. Moreover, the distributed ESCGS reduces by 87% of the running time with total 16.5-MB message overhead, requiring no more than 0.05-ms transmission delay in a 100-Gb/s backbone network with eight MEC servers, 1000 SIoTs, and 800 monitored locations.