The findings prompt the authors to suggest that corrective surgery should be performed not later than the age of 6, which is when the discrimination seems to emerge.
The Swiss researchers digitally altered photographs of six children from six identical twin pairs to create inward and outward types of visible squint (strabismus) to compare against normally aligned eyes.
One hundred and eighteen children between the ages of 3 and 12, who were either patients at an eye clinic or the siblings of patients, but with normally aligned eyes, were then asked to select which of the identical twins they would be prepared to invite to their birthday party.
They were asked to make a choice four times, giving them the chance to select the faces of up to four children with a squint. If squints were to make no difference to selection, an average selection of two children with a squint would be expected, say the authors.
Factors, such as the colour of the top the child was wearing, gender, or the type of squint s/he had made no difference to the likelihood of selection.
And children under 6 didn't make any distinction between the twins with a squint or normally aligned eyes.
But children aged 6 or older were significantly less likely to select the pictures of children with a visible squint.
Among the 48 children aged between 6 and 8, 18 did not select any child with a squint; 17 selected this type of child once, 11 did so twice; two did so three times. None did so four times.
This compares with 31 children between the ages of 4 and 6, one of whom did not select any child with a squint, and 21 of whom selected a child with a squint once or twice. Nine children in this age group made this selection three or four times.
When asked if they had noticed anything particular about the twins, around one in five (19%) of 4 to 6 year olds commented on eye alignment, a figure that rose to 39% after being asked to pay attention to the eyes in the pictures.
Among 6 to 8 year olds, almost half (48%) noticed the squint, which rose to more than three quarters (77%) after being asked to pay attention to the eyes.
The authors comment that a childhood squint can have a lasting psychological impact on the individual concerned and that "visible differences in general have a negative impact on how children are perceived by peers."
They conclude: "Our results show that schoolchildren with strabismus seem less likely to be accepted by their peers, so corrective surgery for strabismus should be performed before the age of 6 years, when negative social implications may arise."