Recently, data sparsity is still one of the critical problems faced by recommendation systems. Although many existing methods based on cross-domain can alleviate it to a certain extent, these methods only use the information of single-domain (e.g., user-side, item-side and rating-side) or dual-domain (e.g., user-rating-side, user-item-side and item-rating-side) to make recommendations, which results in performance degradation. In this paper, we propose a triple cross-domain collaborative filtering method to alleviate data sparsity, named TCD-CF. In TCD-CF method, the triple-side intrinsic characteristics are first obtained by using the joint nonnegative matrix factorization to integrate the user-side, item-side and rating-side domain knowledge. Then the extended codebook (as knowledge to transfer) based on these intrinsic characteristics is constructed by using the orthogonal nonnegative matrix tri-factorization. Finally, the codebook-based transfer method for cross-system CF is applied into the source domain and target domain to predict the missing ratings and perform recommendation in the target domain. Extensive experiments on two real-world datasets demonstrate that the proposed method outperforms the state-of-the-art methods for the cross-domain recommendation task.