Liam, who lives on the 34th floor of the apartment building in Canary Warf, one of the tallest in the area, where the picture was taken.
After fans voiced their concerns via Twitter, the 19-year-old posted: “It was a stupid and irresponsible thing to do. I am sorry.
“I regret being there and having a photo taken of me. I do not endorse any fans trying to repeat this as it is extremely dangerous.”
After seeing him posing at 360ft, one fan tweeted the star: “Can you stop giving us heart attacks? You’re not really Batman babe.”
The fan was referring to Liam’s superhero idol, of whom he has a full-size figure of at home.
A source close to the singer defended the picture, saying: “He wanted to take a picture on a new phone that showed off the view of London.
“One of his mates who stayed on the balcony took the picture.”
On the night of the picture Liam had been out celebrating bandmate Zayn Malik’s 21st birthday, and it is believed he had been drinking at the time it was taken.
Liam also took to Twitter for a slightly different reason last night – to tell fans to leave him alone.
He wrote: “I know my friends have tweeted pictures of my house but can people please stop waiting outside. I’d like to be able to walk outside as everyone does.”