According to the IRS website, a 501(c)(3) organization “may not be an action organization, i.e., it may not attempt to influence legislation as a substantial part of its activities and it may not participate in any campaign activity for or against political candidates.”
Read this story for a better understanding of how the group stays within the letter of the law:
http://legallyeasy.rocketlawyer.com/...tax-laws-91402