You just don't get into a person's personal space, especially a police officer's. If need to talk to an officer and I'm behind him, I speak up when I'm a good distance away. Add to that the recent ambush killings, and the guy was just asking for it. Not saying the cops weren't dicks, they were. It would have been much better PR to, after the initial WTF are you doing, to calmly educate the moron, shake hands, and move on. But I understand their reaction. It wasn't brutal, and it wasn't a slam.
For his next prank, he should go to the airport and joke about having a bomb. See where that gets him.