James Martin, 36, sent David Kerr – a former BBC journalist and SNP Holyrood candidate now working for the Yes campaign – a private message on the social networking site on 11 May.
Mr Kerr was so concerned by the message, on his personal Facebook account, that he called in police.
Martin later told officers he had wanted to “make his feelings clear” to Mr Kerr – who he said was “using religion as a tool to gain publicity for the SNP”.
Fiscal depute Susan Ruta told Dundee Sheriff Court: “When asked why, he said, ‘Out of frustration and anger towards someone who uses religion as a tool to gain publicity for a political representation for SNP. That is wrong for society’.
“And he said he wanted to make his feelings clear.”
He was then cautioned and charged by police.
Martin admitted that on 11 May at his home address he sent an electronic message that was grossly offensive and of an indecent, obscene, or menacing character, in that he swore and made threatening and sectarian remarks, aggravated by religious prejudice.
Solicitor-advocate Jim Laverty, defending, said: “Mr Martin is sincerely apologetic and knows he was wrong for expressing his feelings in such a way.
“He has written a letter to the complainer offering a clear apology which I will ensure is passed on to him.”