Personally, I don't see school shootings being caused by social media directly.
Rather, it probably has more to do with the disintegration of the family unit that makes children more prone to mental disorders. And why the family unit is in danger is another can of worms all together...
You COULD however make a case that the destruction of the nuclear family makes kids more prone to be addicted to social media and bear the consequences of its excessive use.
I would guess there are many pieces to the puzzle and hopefully we can get the full picture one day.