It is narrated from the Prophet of Islam (PBUH) who said:
You are never able to keep all the people happy and satisfied with your wealth. Therefore, try to keep people happy with yourself with good behaviour [1]. This narration points to the fact that one cannot keep everyone happy with his/her wealth, but there is a way that we can get close to all the people or the majority of them. If you are humble, trustworthy, and do not commit bad acts against them; these are the characteristics which people like. So with good behaviour and appropriate characteristics, one can attract the attention of others to himself/herself.
[1] Al-Amaali, Sheikh Sadooq (RA), Page 62.
Source: en.shafaqna.com