All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Calling people to Allah is an obligation on every Muslim male and female according to the Book of Allah and the Sunnah of Prophet Muhammad .
Allah Says (what means): {Say, “This is my way; I invite to Allah with insight, I and those who follow me. And exalted is Allah; and I am not of those who associate others with Him.”} [Quran 12:108]
If Allah guides a person to the right path thanks to a Muslim man or a Muslim woman, then the one who guided him will a great reward.
The Prophet said to Ali : “If Allah guides one single man (to Islam) thanks to you, it would be better for you than possessing the red camels (i.e. the most precious breed of camels).” [Al-Bukhari and Muslim]
However, you should be careful while addressing those men as they might lead you to do what angers Allah. Also, you should have a good Islamic knowledge so that you may address whomever you are addressing in a right and acceptable manner and protect yourself from any misconception or situation like the one which you mentioned in the question.
Finally, you should know that there is an important rule in our religion in this chapter and other chapter that: the objective does not justify the means. Calling to Allah is an objective but there is a special means for doing so in the Sharee’ah, and the way which you used is not among these means. Therefore, you should repent to Allah.
Allah knows best.