Lawmaker apologizes for tweet comparing Obama to Hitler