PRE-REQUISITES

For the following snippets to work as intended you will need to add fliplet-communicate library to your app. Use the following instructions to add it:

  1. When in Fliplet Studio’s Edit screen, open the Developer Options from the right hand menu
  2. With the Developer Options open, click the Libraries button in the top right corner
  3. In the search field, type in ‘fliplet-communicate’
  4. Click it to add it to the list
  5. Click Save

Share URL on mobile

Image 2 of 2

To help users share a website URL with other people, you can offer them shortcuts to do this. For example you can give the user options to copy the URL or share it via Twitter, Facebook or WhatsApp (if they have the app).

To pop open the URL sharing menu, run the code below (in this example we’re sharing a link to a Google map).

// A simple way to share a URL
Fliplet.Communicate.shareURL('https://maps.google.com/?addr=EC2A+4DN');

On desktop browsers it’s also possible to share the URL with a message for the recipient. You can do this with the following code:

// Add an optional message for apps that support the sharing a URL with a message
Fliplet.Communicate.shareURL({
  url: 'https://maps.google.com/?addr=EC2A+4DN',
  message: 'Drop by and say hi!'
});
Was this article helpful?
YesNo