The head of Germany’s domestic intelligence agency warned Sunday that China is using social networks to try to cultivate sources of information among lawmakers and officials, while Chinese hackers are increasingly attacking European companies through trusted suppliers.