US President Donald Trump said he will introduce legislation that may scrap or weaken a law that has long protected Internet companies, including Twitter and Facebook.