The word socialism is misleading. Bastiat explains in the Law that what he means by socialism is all manner of plunder in the forms of (and he lists them) tariffs, protection (protectionism), prerequisites, gratuities, encouragements, progressive taxation, free public education, right to work, right to profit (he doesnt mean profit you earn but those guaranteed by government. Think too big to fail), right to wages, right to assistance, right to instruments of labor, gratuity of credit, etc. etc.
He would also be opposed to any anti immigration efforts, including building a wall. He would of seen trying to prevent people from immigrating here as a form of protectionism (for American workers) under the false philosophy of scarcity, which is that its better to have fewer of a thing, (in this case labor) under the false notion that scarcity is better than abundance.