The actual involuntary commitment was done under VA law. The FBI was involved in the investigation. The real problem is that authorities at all levels felt that the recent shootings gave them cart blanche to not have to produce anything remotely resembling evidence to commit Raub.
When I first found out about this story, I read all of Raub's Facebook comments and felt their had to be something else, such as a threatening email, to warrant this action. When I found out that all the government had was his Facebook posts, to me the action clearly became unwarranted, and thankfully a judge agreed.
Well, there is that little first amendment thingy...