 He pursued his literary goals by submitting poetry and prose to various newspapers and magazines , partly due to encouragement from Professor Thomas Cogswell Upham . Between January 1824 and his graduation in 1825 , he published nearly 40 minor poems . About 24 of them appeared in the short @-@ lived Boston periodical The United States Literary Gazette . When Longfellow graduated from Bowdoin , he was ranked fourth in the class , and had been elected to Phi Beta Kappa . He gave the student commencement address . 
