First, how bad is "bad"? Second, what are your limits? Third, can you really help? Fourth, is walking away a form of help? Fifth, what does your need of "bad" people say about your path?
First, how bad is "bad"? Does it mean people who are not as far along the path? Does it mean those who don't care for the dharma? Does it mean toxic people? Knowing the specific problem can help you know whether you should help or not. Also, don't assume that just beacause they carry the label of Buddhist or are in your Sangha that they are on the same path. Some of the most toxic people I met were in my Sangha.
Second, what are your limits? Boundless compassion is great, but usually there are limits to where we are at the moment. We want to challenge those limits, but we don't want to go overboard and end up dragging ourselves down.
Third, can you really help? Most people don't want to be helped -- they identify with their pain, consider it themselves and thus cherish it above most else. Confronting that pain becomes an attack on their identity, and the reaction can be ugly. Further, some people just want someone to exploit and they can string you along, making you think you are helping so you stick around.
Fourth, is walking away a form of help? It can be. If you stick around and try to help, you may simply be reinforcing their behavior, by providing them with what they want: attention. By walking away, they lose the platform and may get the message that they will lose other people, or that they are noxious in the eyes of others. This might just make them re-evaluate what they've been doing. After all, they do what they do because on some level they think it's "working", so maybe they need to see it's not "working"?
Fifth, what does your need of "bad" people say about your path? That you need to associate with such people due to social networking means there is a worldly pay-off to associating with them. That's fine, but it's important to note that it's not dharma at this point. Being immersed in the world builds up webs of dependencies which can easily enmesh us, and part of it is the possible domino effect of associating with certain individuals. How you choose to live your life is a decision only you can make, but it may not hurt to keep your eyes open to what you are really doing; it may help you balance the dharma and the worldly more effectively.
Conclusion: Just wanting to help is not enough, we need to wisely apply our efforts. Failure to do so leads to what some Buddhists call "Idiot Compassion". Don't let the harsh-sounding phrase scare you off -- and I recommend visiting that link, as it's relevant to this situation.