A popular folk etymology for "to spill the beans" claims that in ancient Greece, applicants for membership in secret societies were voted upon by having the existing members drop beans into a pottery jar. Those who approved of the potential new member would signal an affirmative vote by adding a white bean to the jar. A black bean indicated a negative vote. The story goes that on occasion, when the jar was accidentally knocked over, the beans poured out and the vote was revealed prematurely. Somebody had "spilled the beans". It's an engaging tale, and beans were in fact once used as ballots. So as you can see, not much is certain about the origin but it surely is a very interesting idiom. And I’ve always been fond of this phrase.