Despite advancements in the Internet of Things (IoT) and social networks, developing an intelligent service discovery and composition framework in the Social IoT (SIoT) domain remains a challenge. In the IoT, a large number of things are connected together according to the different objectives of their owners. Due to this extensive connection of heterogeneous objects, generating a suitable recommendation for users becomes very difficult. The complexity of this problem exponentially increases when additional issues, such as user preferences, autonomous settings, and a chaotic IoT environment, must be considered. For the aforementioned reasons, this paper presents an SIoT architecture with a personalized recommendation framework to enhance service discovery and composition. The novel contribution of this study is the development of a unique personalized recommender engine that is based on the knowledge–desire–intention model and is suitable for service discovery in a smart community. Our algorithm provides service recommendations with high satisfaction by analyzing data concerning users’ beliefs and surroundings. Moreover, the algorithm eliminates the prevalent cold start problem in the early stage of recommendation generation. Several experiments and benchmarking on different datasets are conducted to investigate the performance of the proposed personalized recommender engine. The experimental precision and recall results indicate that the proposed approach can achieve up to an approximately 28% higher F-score than conventional approaches. In general, the proposed hybrid approach outperforms other methods.