The document proposes an Affective Processing Programming Teaching Plan (APPTP) that uses affective teaching methods and a Facebook group to enhance student motivation in learning programming. It conducted a study with 15 Taiwanese high school students learning the Processing programming language. Questionnaires assessing motivation and Facebook usability found that the APPTP improved students' intrinsic motivation, perceived course value, and learning control. However, the relationship between Facebook usability and motivation was not clear. Overall, the study suggests that the APPTP integrating affective teaching and social media can increase programming motivation for students.