Question: when was the song my country tis of thee written
Answer: Samuel Francis Smith wrote the lyrics to `` My Country ' Tis of Thee '' in 1831 , while he was a student at the Andover Theological Seminary in Andover , Massachusetts .