Question: when was you got a friend in me written
Answer: Used as the theme song for the 1995 Disney / Pixar animated film Toy Story , it has since become a major musical component for its sequels , Toy Story 2 ( 1999 ) and Toy Story 3 ( 2010 ) as well as a musical leitmotif throughout the whole Toy Story franchise .