Speculation is not going to help right now. Our wishes should be for the victims and not building more hate on the shooter, motive or those who might have know him.
The facts will come out in time. Let police do their work. The shooter is dead and no longer a threat.
If he was making threats, those on social media should have reported him and just maybe the police might have stopped him before he killed so many.
I remember a poster on AOL before 911 that was making open threats, non-specific, but reports were made. The poster might have hoped, guessed, or had some knowledge but he was not an arab muslim so not directly involved. His name was pulled and his threats stopped, on those forums.
Threats to harm others or ones self online should be reported. Screen name and ISP along with copies and links of the threats should be give to police, justice, FBI, Homeland, the web site and the person's server if known.
If you take action, you might just save a life, I did for a girl in the UK.