The Prophet ﷺ commanded him to build the mosque of Taif on the site where their idols had stood.
حدثنا رجاء بن المرجى حدثنا أبو همام الدلال محمد بن محبب حدثنا سعيد بن السائب عن محمد بن عبد الله بن عياض
أن النبي ﷺ أمره أن يجعل مسجد الطائف حيث كان طواغيتهم
[Its chain of transmission is daif] Ibn Majah reported it in "The Book of Mosques," the chapter on where it is permissible to build mosques, no. 743, from the hadith of Abu Hammam Dallal.Muhammad bin Abdullah bin Iyad is of unknown status, and no one but Ibn Hibban rated him trustworthy.