Re: Hazrat Yazid: Did the muslims gave oath of allegiance to him or he was nominated
Mu'awiya made Yazeed his Khalifa during his lifetime
the last will and testament of Mu'awiya in which it is clear that he has made Yazeed his khalifa:
"O my son, I have arranged everything for you, and I have made all the Arabs agree to obey you. No one will now oppose you in your title to the caliphate, but I am very much afraid of Husayn b. Ali, Abd Allah b. 'Umar, Abd ar-Rahman b. Abi Bakr, and Abd Allah b. az- Zubayr. Among them Husayn b. Ali commands great love and respect because of his superior rights and close relationship to the Prophet. I do not think that the people of Iraq will abandon him until they have risen in rebellion for him against you. As far as possible, try to deal with him gently. But the man who will attack you with full force, like a lion attacks his prey, and who will pounce upon you, like a fox when it finds an opportunity to pounce, is Abd Allah b. az-Zubayr. Whenever you get a chance, cut him into pieces."
Iqd al Fareed, Volume 4 page 226
Here they also try to rid Mu'awiya of the crimes his son Yazeed committed against the Ahlul Bait at Kerbala.
From this text Mu'awiya had told his beloved son "No one will now oppose you in your title to the caliphate" - he is not telling Yazeed that he had made him Crown Prince he is informing him that he had laid the foundation for him to succeed him as khalifa.
To this effect we even have evidence from Sahih Bukhari, Volume 6, hadith 352:
Narrated Yusuf bin Mahak: **
**Marwan had been appointed as the governor of Hijaz by Muawiya. He delivered a sermon and mentioned Yazeed bin Muawiya so that the people might take the oath of allegiance to him as the successor of his father (Muawiya)..