McCain implied that Obama was somehow siding with the enemies of America, the Hamas, who need to be dealt with by becoming "a nightmare", in MaCain's view (a view not shared by Condi Rice, as noted here).
Obama is right to question McCain for forgetting that Americans are all on the same side, for losing his bearings about that, frankly.