For nine months, Representative Anthony D. Weiner has been tweaking others via Twitter, poking fun at Sarah Palin, John A. Boehner and especially Michele Bachmann as he offers his 46,000-plus followers an unusually candid window into the thoughts, activities and edgy humor of a politically ambitious congressman.

Mr. Weiner always knew that his sharp tongue, combined with his frequent use of Twitter, had a potential risk. But over the weekend, Twitter trouble found Mr. Weiner in an unexpected way.

A sexually suggestive photograph of a man from the waist down, in nothing but underwear, was sent from Mr. Weiner’s Twitter-related photo-sharing account to a woman in Seattle. Mr. Weiner dismissed the picture, saying his account had been hacked and writing on Saturday in a Twitter message (of course): “Tivo shot. FB hacked. Is my blender gonna attack me next?” He told Politico, “The wiener gags never get old, I guess,” and his office issued a statement on Sunday saying, “Anthony’s accounts were obviously hacked.”

The recipient of the photo, a college student who follows Mr. Weiner on Twitter, told The Daily News that someone had been harassing her online for weeks and that “I assumed that the tweet and the picture were their latest attempts at defaming the congressman and harassing his supporters.”