Hi, James.
We do not provide support for integration with third-party themes’ features, but here’s a code snippet that may be helpful if you want to use Jetpack’s sharing feature:
https://gist.github.com/cliffordp/36162128f190563c782c0e029cb915a4
Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.
Also, FYI, the code you shared looks incomplete unless it’s going to be used in one of your theme template files (i.e. not complete for using in functions.php).
If you want to use your theme’s sharing buttons, please contact them for further assistance.
I hope this information helps!