Original: It was composed by Ryan Tedder, Evan Bogart and Knowles for her third studio album, I Am… Sasha Fierce.
Simplified: It was written by Ryan Tedder, Evan Bogart and Knowles for her third studio album, I Am... Sasha Fierce.