We present Socialite, a novel end user programming tool for the Social Internet of Things (SIoT). SIoT is a new paradigm where IoT merges with social networks, allowing people and connected devices as well as the devices themselves to interact within a social network framework. Through an online survey with 60 potential users, we identified eight desired features for the SIoT, which were then clustered into four rule categories that can be programmed by end users and/or imposed by systems. The rules created by end users are used to reason about both devices and people in their social relationships to support automated decisions during runtime. Socialite uses ontology/semantic models for basic/low-level knowledge representation (e.g., device and user) to encapsulate the heterogeneity in devices from various manufacturers, and uses production rules (trigger-action programming) for high-level reasoning. With the ontology model, our reasoning supports both device type automation (e.g., current temperature from a thermostat) and capability-based automation (e.g., current temperature from any devices with the same capability). Furthermore, the Socialite rules leverage social relationships and device capabilities to facilitate collaboration by efficiently sharing configuration and information among users/friends and even with devices from people unknown to a user. In a 24-participant user study (12 with no programming experience), we found that Socialite was easy to learn and use, for both programmers and non-programmers. Participants were able to create automation based rules, social relationship involved rules, as well rules they created during the study.