Kindly refer to the following link(s):
How to have righteous company when I'm surrounded by people of innovation & Shirk?
How do I Socialize with others when there is so much fitnah everywhere?
How can we avoid sins when righteous friends / companions are not available?
The believer who mixes with people and puts up with their abuse | By Assim Al Hakeem