S
S
Serafim Ivanov2019-10-15 03:00:36
JavaScript
Serafim Ivanov, 2019-10-15 03:00:36

How to bring up the share menu on Android and iOS?

Hello!
Can you please tell me how to call the standard share menu on Android and iOs when clicking on a specific link?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rustam Bainazarov, 2019-10-15
@SmthTo

Only works in fairly new browsers:
https://developer.mozilla.org/en-US/docs/Web/API/N...

navigator.share({
    title: 'Дратути!', // Заголовок
    text: 'Здарова, бандиты!', // Текст
    url: 'https://bandits.org', // ссылка
  });

Calls up this menu:
And sends it quite nicely, for example, to Telegram:
~ ~ ~
On the example of data-attributes:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question