The players, who have since left the club, were sent messages from Michael Convery on Twitter after a game against St Johnstone in Perth on January 14, 2012.
Mr Bartley, 22, said he found the messages "intimidating" and thought that "society had got over these sorts of comments".
Mr Edu, 27, described feeling shocked on seeing the messages he had been sent.
They gave evidence at the trial of Convery, 43, from Linthouse, Glasgow, who was convicted at Glasgow Sheriff Court of sending racist remarks on Twitter to the players.
Sheriff Valerie Johnston jailed Convery for six months.
Although none of the messages were read out in full in open court, it was heard that Bartley was sent a direct comment from Convery and mentioned in a second one and Edu was sent two direct comments.
Bartley was asked what he did when he received a particular message.
He said: "I actually re-tweeted the tweet. It allowed the public eye to see the comments, and I reported it to David Martin, who is head of security at Glasgow Rangers."
The court heard the word "monkey" was used, Bartley said it was "a comment he was used to".
Procurator fiscal depute Jonathan Kemp asked how he felt on receiving them and the witness said: "I just felt a little bit hurt and disappointed really."