Just before stocks ended another bruising day, the president took to social media to promote progress in talks with Iran.