The rapid development of Web 2.0 allows people to be involved in online interactions more easily than before and facilitates the formation of virtual communities. Online communities exert influence on their members’ online and offline behaviors. Therefore, they are of increasing interest to researchers and business managers. Most virtual community studies consider subjects in the same Web application belong to one community. This boundary-defining method neglects subtle opinion differences among participants with similar interests. It is necessary to unveil the community structure of online participants to overcome this limitation. Previous community detection studies usually account for the structural factor of social networks to build their models. Based on the affect theory of social exchange, this research argues that emotions involved in social interactions should be considered in the community detection process. We propose a framework to extract social interactions and interaction emotions from user-generated contents and a GN-H co-training algorithm to utilize the two types of information in community detection. We show the benefit of including emotion information in community detection using simulated data. We also conduct a case study on a real-world Web forum dataset to exemplify the utility of the framework in identifying communities to support further analysis.