WASHINGTON -- President Barack Obama on Thursday became the first president to respond to questions on Twitter, answering tweeted questions about the administration’s so-called Congress to-do list.

The White House gave 40 minutes' notice -- in the form of a tweet signed by the president himself -- that Obama would take tweeted questions. Earlier in the day, its official Twitter account started soliciting questions, but was mum on who would answer. Obama is in Iowa, and answered the questions between a visit to a Newton, Iowa, wind turbine manufacturer and a campaign event in Des Moines.

The chat lasted 21 minutes, during which Obama answered seven questions, promoting his energy policy, small business tax credits and "pushing big banks to do the right thing." It took Obama more than 140 characters to answer a few of them, so he broke the answers into multiple tweets.

A photo tweeted by White House photographer Pete Souza confirmed that it was indeed Obama who was answering the questions. The photo shows Obama at a conference table in front of a MacBook Pro, with Macon Phillips, the White House director of digital strategy, next to him.

The hastily announced event was a contrast to Obama’s Twitter town hall, which took place last July. The town hall, in the White House East Room with Twitter co-founder Jack Dorsey as a moderator, was hyped days in advance and broadcast live on cable TV. But Obama only took the questions from Twitter, which Dorsey read to him, and he answered them out loud before the East Room audience. Thursday’s Twitter chat marked the first time Obama actually answered questions on the popular 140-character social network.

At the Twitter town hall, prominent Republicans were frequently tweeting politically-charged questions using the event’s hashtag. On Thursday, a handful of Republican politicians and strategists tweeted questions.

But a more persistent problem has been spam associated with popular Twitter hashtags -- no doubt a problem for the president's Twitter chat Thursday as well. Spam tweets, many of a pornographic nature, took over the #WHChat hashtag and may have been why the White House gave little notice of the chat.

The Twitter chat took place on the official White House account, and not Obama's campaign account, @BarackObama. Obama's Republican rival, Mitt Romney, has not yet held a Twitter chat.

Below, a look at how the presidential Twitter chat played out:

Related on HuffPost: