(Reuters) – The S&P 500 and the Nasdaq extended a rally on Thursday, as strong earnings from Facebook Inc added to optimism after the Federal Reserve’s dovish remarks, with investors awaiting the outcome of the U.S.-China trade talks.