YOU USE THIS AT YOUR OWN RISK. IF YOU GET SUSPENDED OR BANNED FROM TWITTER IT'S YOUR OWN STUPID FAULT.
If you link to
https://example.com/?server=[servername]&user=[username]
this page will redirect to your Mastodon account in a way that Twitter does not (currently) detect.
This service currently only supports the following server names:
This is a single HTML file with some JavaScript. If you know how to host single page websites and want to make your own, view the source and make a copy.