We present theoretical results for the source function in photophoresis of an arbitrary aggregate of spheres that are homogeneous and isotropic piecewise. This source function directly represents the distribution of electric fields inside the spheres. Our calculation is based on a rigorous analytic solution to the radiative multisphere-scattering problem developed recently [Y.-l. Xu, Appl. Opt. 34, 4573 (1995); 36, 9496 (1997); Phys. Lett. A 249, 30 (1998)]. When an aggregate degenerates to a single sphere, the results are exactly the same as those given by the Mie theory. We also discuss the numerical techniques necessary for obtaining an accurate numerical solution for the source function.