Before he was elected as the ninth president, William Henry Harrison was mocked by his opponents for being dull, with one newspaper writing, "Give him a barrel of hard cider and settle a pension of two thousand a year on him, and take my word for it, he will sit the remainder of his days in his log cabin."
Harrison's party spun this description to his benefit, labeling him the "log cabin and hard cider" candidate, and contrasting him with President Martin Van Buren, whom they painted as out of touch with the people. Harrison's "Log Cabin Campaign of 1840" built log cabins that functioned as stores selling log cabin-themed campaign merchandise.
The strategy worked, leading to Harrison's victory. Campaign buttons became popular when the fastening pin device was patented in 1896.