I don't think it's a valid comparison. Not making a statement on the Sandy Hook suit's merit, but clearly the San Bernardino couple didn't shoot up the place with tweets and wall posts.
Not a valid comparison? It's the exact comparison. What about suing the truck manufacturers when that terrorist ran over a bunch of people, or Boeing for 9/11, etc. Just because they are a manufacturer of firearms doesnt excuse them from this ideology.
Facebook and Twitter did not build the tools used to enact the shooting. The claim is that Facebook and Twitter allowed their platform to contain things that influenced the perpetrators. This is closer to blaming Charlie Hebdo for the terrorist attack against them, because the content they published clearly spawned the attack.
Lack of a federal law doesn't necessarily make that comparison invalid; perhaps there should even be an analogous law protecting "free speech platforms" that is rooted in the first amendment, similar to how the law you cite it ostensibly rooted in the second.