Components - Social Media Sharing Panel

social-media
web-dev

#1

Each event page will now include a panel of sharing buttons linked to the main social media sites, allowing the viewer to share the event with their friends. Currently we’re displaying the following:

  • Facebook
  • Twitter
  • Reddit
  • LinkedIn
  • Direct email

The relevant React logic is stores in the following component:

/imports/client/ui/components/SharePanel

MAIN FEATURES & INGREDIENTS:

  • Buttons are powered by the external library ‘react-share’
  • The full list of compatible platforms is very comprehensive, included for reference in the component index file - however many of these are either focused on local audiences - e.g. VK/VKontakte in Russia - or not fully compatible with web browser - e.g. WhatsApp/Telegram.
  • The component identifies the URL to share via the viewer’s window.location object, and also includes a text message with the event title (via the page title) and the event schedule.
  • Additional details on the component logic are available in the .js file using JSDOC documentation.