The oldest son could often represent his father in Israel culture. Amnon was David's oldest son.
David knew that Amnon was not Absalom's friend.