Interactions between teachers and students can be effectively enhanced if teachers can capture the spontaneous nonverbal behaviors (e.g., facial expressions and body language) of their students in real time, thereby effectively improving teaching strategies and the learning effectiveness of students. In this study, we implemented an expression–response analysis system (ERAS) to analyze facial expressions. The ERAS employs a web camera to capture the facial images of students. Their facial expressions are analyzed to assess their attitude toward progressively more difficult course content, and to determine the relationship between their social interactions and learning effectiveness. The ERAS identified 10 facial feature points that form 11 facial action units (AUs). Subsequently, the AUs were classified as positive, neutral, and negative social interactions by applying a rule-based expert system, and cognitive load theory was applied to verify the classifications. The experimental results showed that student with high coding abilities could adapt to the multimedia digital learning content, as evidenced by the comparatively higher expression of neutral and positive social interactions, whereas students with low coding abilities reported a higher frequency of negative social interactions resulting from the increase in cognitive load. Simultaneously, the real time detection of social interactions can provide a basis for diagnosing student learning difficulties and assist teachers in adjusting their teaching strategies.