Barack Obama actually said...
I have said that they are a terrorist organization, that we should not negotiate with them unless they recognize Israel, renounce violence and unless they're willing to abide by previous accords between the Palestinians and the Israelis.
Context
Obama discusses his stance on Hamas and the conditions for negotiation.
05/07/2008