Here's how Taylor Swift helped Nyong'o in her hard time

Taylor Swift and Nyong'o

Actress Lupita Nyong'o says Taylor Swift's hit "Shake it off" helped her to get through a hard time.

The 35-year-old actress spoke with reporters on Tuesday at the Sundance Film Festival in Park City, Utah, revealing how the 2014 hit lifted her spirits amid a rough patch in her career, reports

"I was going through a hard time professionally, and I was just in a funk," said Nyong'o, who was promoting her new film LITTLE MONSTERS, which features the track.

The 12 YEARS A SLAVE star said that at the time she "was working abroad" and her "best friend came to cheer" her up. 

"He played ‘Shake it off' on his phone and we just had a dance party in my bedroom."

Nyong'o said that it "meant a lot" to her that the track was included in the movie.

"I wrote Taylor Swift myself and asked her and told her that story -- and she said yes," said the actress, who in the film is a teacher named Miss Caroline who plays the song on a ukulele to keep the children calm.

Nyong'o is also elated that BLACK PANTHER became the first superhero film ever to make it to the Best Picture category at the Oscars. It has earned seven nominations. The 91st Academy Awards will be held on February 24 here and will air in India on Star Movies.