This study aims to explore how gamification elements influence the development of the Community of Inquiry (CoI) in an online project-based programming course conducted on Facebook. We formed student groups by using a quasi-experimental design from students studying in the computer science department. While both courses were project-based, the experimental group's project development process was enriched with gamification elements. We collected data from the CoI survey, transcript analysis of online discussions, and interviews with students. The results indicated that the use of gamification elements contributed significantly to students' social, cognitive, and teaching presence development. Besides, while a high level of CoI perception was created in both groups in the online project-based learning environment, the design and organization role of the instructor came to the fore in the gamified environment more.