Detectives say David Torres's post said: "I'm going to kill everyone at PSHS tomorrow so stay home, I got a gun."
Torres is not a student at the school. Police said it was a prank.
Torres was charged Wednesday with making criminal threats, a felony that could land him in prison for up to three years if convicted.