WWE Hall of Famer Mick Foley says last night's Royal Rumble was so badly mishandled, it was a slap in the face to wrestling fans ... all because the WWE refused to allow a HUGE superstar to participate.

Foley -- aka Mankind -- went off on social media right after the Pay-Per-View event ... blasting the org. for not including bearded fan-favorite Daniel Bryan in the main 30-man event.

"I've never felt so disgusted at the conclusion of a WWE (or any) PPV," Foley said ... "Like many of you out there, I just don't get it."

The fans at the event were just as pissed off as Foley -- 'cause when it became clear Bryan was participating in the RR, the stadium erupted in "boos" that continued for the rest of the event.

Foley -- who's still under contract with WWE (for another month) -- also tweeted, "Does @WWE actually hate their own audience?"

After the Rumble, Bryan also tweeted ... saying, "Sorry guys, the machine wanted me nowhere near the Royal Rumble match. But I thank everyone for their support."

He added, "They try to keep US down and away from the top spots, but they can’t ignore the reactions forever. Keep voicing your opinions."

As for Mick, he claims he's so upset with the WWE, he's going to throw a brick through his TV to protest.