It is narrated from Sayyiduna Salman (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said to Sayyiduna Ali (may Allah be pleased with him): "The one who loves you is the one who loves me, and the one who hates you is the one who hates me."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6072