They originally used Ruby on Rails, but it's been considered to be the cause of a lot of their downtime and problems, so it's probably not the best approach. Last I heard they were transitioning a lot of their code to Scala.
Twitter: blaming Ruby for their mistakes?
Twitter Said To Be Abandoning Ruby on Rails