Ok, but if a connection to Twitter is made, the problem still persists. A connection to Twitter would send the IP of the user over to their servers. The IP address is considered personal data and can therefore not be sent around without proper justification.
The only solution then is to disable the sharing functionality. Tho I still don't understand why there must be a connection to Twitter at all. A simple sharing link would be enough.
I appreciate your effort, but under GDPR you need a good justification to share user data (like his IP address). Since the sharing functionality is not essential for the functioning forum, enabling it by default and without prior consent is most likely not compliant, even if you put it into your privacy policy (which you have to do anyways).
Since I am European, this is too much of a risk. But it's ok, I can live without the sharing functionality.
But I appreciate your help and that you took your time to try to resolve this problem.