Full Idea
I conclude other humans have feelings like me because they have bodies like mine (which I know in my case to be antecedent to feelings), and because they exhibit acts and outwards signs which I know in my own case to be caused by feelings.
Gist of Idea
I judge others' feeling by analogy with my body and behaviour
Source
John Stuart Mill (Examination of Sir Wm Hamilton's Philosophy [1865], p.243), quoted by Keith T. Maslin - Introduction to the Philosophy of Mind 8.2
Book Reference
Maslin,Keith: 'An Introduction to the Philosophy of Mind' [Polity 2001], p.215
A Reaction
It is hard to see anything further that can be added to the 'other minds' question. Behaviour is highly relevant (imagine meeting a human who talked like a robot), but so are bodies (imagine a tin box that talked like Marilyn Monroe).