Barack Obama actually said...
I have never suggested that Senator McCain picks his positions on national security based on politics or personal ambition.
Context
Remarks to the Veterans of Foreign Wars Convention in Orlando
08/18/2008