The double photoionization of molecular hydrogen is theoretically investigated in the 40--100-eV photon energy range. The calculation is ab initio and rests first on the Born-Oppenheimer separation. The exact nuclear wave functions have been used for both (bound) initial and (dissociative) final two-proton states and the Franck-Condon approximation is not invoked. The electronic part of the initial ground state of ${\mathrm{H}}_{2}$ is highly correlated while the final one is simply a symmetrized product of uncorrelated Coulomb wave functions. Within this framework, the total cross sections obtained in the dipole-velocity formulation agree well with very recent experimental results. In addition, the method is able to provide the kinetic-energy distributions of the fragments (electrons and protons) as functions of the photon energy. The energy distributions of the ejected protons, produced by 60--100-eV impacting photons, are similar in shape to those resulting from electron or proton impact on ${\mathrm{H}}_{2}$. In contrast, it is found that the most probable two-proton kinetic energy is significantly lowered in the threshold region. On the other hand, the differential electron spectrum gives some insights into the sharing of energy between the s, p, and d ejected electrons. Within the \ensuremath{\delta} approximation, which is shown to be very accurate over the whole photon energy range, the threshold law for the double photoionization of diatomic molecules is derived. It is found that the cross section can be represented, up to 10 eV above threshold, as the convolution of the density probability in the initial vibrational ground state with a series of linear thresholds, similar to those derived in the Wannier-Rau-Peterkop theory for atoms.