Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

96
Vistas
Why is navigator.share only sharing text, not the URL?

I have added a navigator.share function to my react app, but for some reason, it is only sharing the text from the object and not the URL? Is there something I am missing here?

    function shareList() {
      if (navigator.canShare) {
        navigator.share({
          title: "Page Title",
          text: "brief description",
          url: window.location.href,
        });
      } else {
        //functionality for desktop
      }
    }
<input type="button" value="Share..." onclick="shareList()"/>

On iOS, the share dialogue pops up properly, but the share object is just text and not a URL. Here is a screenshot of the pop-up

Share dialogue screenshot

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It appears the issue was with my device. I tested on another device soon after posting and it worked fine, and after restarting my device it worked as intended.

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.