I have heard that spray foam gives off toxic smoke when it burns, is this true?

All smoke is toxic. In Canada there is no test devised to test building materials or consumer products for smoke toxicity. The smoke from red oak flooring will kill you as will the smoke from one light switch cover plate