If you double-click the Eyedropper Tool you can choose which items get picked up. It's a bit unreliable, and has a few bugs, but it does work in many cases.
You could also simply select Object A, drag the color from the Color Panel to the Swatch Panel, then select Object B and click the swatch you created to use that color.