Absalom did this to all Israel who came to the king for judgment, and so Absalom stole the hearts of the men of Israel.
In context
4Absalom would add, “If only I were made judge in the land! Then anyone with a dispute or a case could come to me, and I would give him justice.” 5And whenever a man approached to bow down to him, he would reach out his hand, take hold of him, and kiss him. 6Absalom did this to all Israel who came to the king for judgment, and so Absalom stole the hearts of the men of Israel. 7At the end of forty years, Absalom said to the king, “Please let me go and fulfill the vow I made to Yahweh in Hebron. 8For your servant made a vow while I was living in Geshur in Aram: If Yahweh ever brings me back to Jerusalem, I will serve Yahweh.”