We investigate spin squeezing dynamics in a two-component Bose–Einstein condensate (BEC) in the presence of the nonlinear interatomic interaction, interspecies interaction and Josephson-like tunneling interaction. In particular, we are interesting in the dependence of spin squeezing parameter on the interspecies interaction and the numbers of atom. By adopting the two-mode approximation and the rotating wave approximation, we succeed in obtaining analytical solutions for the optimally squeezed angle and spin squeezing parameter. It is shown that the stronger interspecies interaction induces faster spin squeezing and the more atoms or the larger population imbalance induces stronger squeezing; while the Josephson-like tunneling gives vanishing contribution to spin squeezing.