 " Tik Tok " was written by Ke $ ha , alongside Dr. Luke and Benny Blanco and was co @-@ produced by Luke and Blanco . Ke $ ha said the inspiration behind the song came from coming home half @-@ drunk and stumbling after a night out of partying . She would then write down a few words to a song , then the following morning she would wake up with the story waiting to be told . The opening line came from an experience where she woke up surrounded by " beautiful women " , leading to her imagining P. Diddy being in a similar scenario . She then proceeded to bring the song to her producer Dr. Luke and Benny Blanco and the song was written . Four hours later , Diddy called Luke and said that they should do a song together . Diddy came to the studio later that day to contribute his lines and the collaboration was completed . 
