Jonathan May-Bowles, 26, admitted attacking the media tycoon on 19 July at a hearing of the Culture, Media and Sport Committee of the House of Commons.
May-Bowles, who calls himself Jonnie Marbles, was sentenced at City of Westminster Magistrates' Court in central London on Tuesday.
Murdoch and his son James were giving evidence before MPs when May-Bowles rushed forward from the public gallery and threw a paper plate of foam.