Be indifferent towards this world, and Allah will love you
It was narrated that Sahl bin Sa’d As-Sa’idi, may Allah be pleased with him, said:
“A man came to the Prophet (peace and blessings of Allah be upon him) and said: ‘O Messenger of Allah, show me a deed which, if I do it, Allah will love me and people will love me. The Messenger of Allah (peace and blessings of Allah be upon him) said: “Be indifferent towards this world, and Allah will love you. Be indifferent to what is in people’s hands, and they will love you.” Compiled by Ibn Majah and al-Hakim who said: Its chain of narrators is accepted. Az-Zahabi rejected it, and al-Albaani classed it as Saheeh in As-Silsilah As-Sahiha after he mentioned its chains of narrators (944)
This Hadeeth is considered by the scholars to be one of the fundamentals of Islam, they regard it as a cornerstone of the strong faith and true certainty. It is a comprehensive discussion of all that a Muslim should follow in terms of seeking the world as well as seeking the Hereafter according to the way that pleases Allah. It is an example of the all inclusive words of the Prophet (peace and blessings of Allah be upon him).
The question indicates that the questioner is prudent, has a broad perception and good manners. He truly loves Allah and people, as evident in asking about what brings him the love of people after asking about what brings him the love of Allah and raise his rank with him. He loves people and seek what makes them love him, Because he knows that Allah the Almighty loves those whom his righteous slaves love. On the other side the righteous slaves do not like except those who obey Allah and cooperated with them on righteousness and piety. Therefore, he was keen to be guided by the Prophet, may the peace and blessings of Allah be upon, to the best of deeds that achieve this noble purpose, so that he obtains the love of Allah and love of people easily. The Prophet (peace and blessings of Allah be upon him) responded with an adequate answer, that is memorable and not to be forgotten. People circulate it generation after generation as a wisdom in which lies the rectification of both this world and the Hereafter.