One Direction's Liam Payne has taken to Twitter to apologize for posing for a photo in which he's pictured doing something pretty unsafe: standing on the ledge of a building, more than 360 feet up.

As OK! magazine reports, a friend of Liam's posted the photo of the singer balancing on the balcony ledge of one of the tallest buildings in London, but it's since been deleted.  Liam subsequently wrote on Twitter, "You may have seen a photo of me today taken on top of a building. I regret being there and having a photo taken. It was a stupid and irresponsible thing to do. I am sorry, and do not endorse any fans trying to repeat this, as it is extremely dangerous."

Liam's mates also caused him further trouble by tweeting photos of his house over the weekend, which led to fans figuring out exactly where in London he lives and camping outside.  Liam wrote on Twitter, "I know my friends have tweeted a lot of pictures of my house the past few days but can people please stop coming and waiting outside. I'd just like to be able to walk outside as everyone does and enjoy time with my friends, not feel bad for not wanting to take a picture."

He added, "Sorry if I've been rude to anyone but I've come to realize if I take one picture more people keep coming everyday xxx hope everyone's good."