Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

457
Vistas
Sharing content on Facebook is not working using FB.ui in for mobile devices?

I have added the following code which is working great on the Web but not on mobile devices the click event does not seem to be triggering.

    var FacebookShare = function() {
        this.method = 'feed';
        this.name = 'A Name';
        this.hashtag = '#YourHashtag';
    };

    $('#facebook-share').click((event) => {
        let options = new FacebookShare();
        options.quote = $(event.currentTarget.parentElement).find('h5').html() 
        facebookshare(event, options)
    });

    function facebookshare(event, options) {
    event.preventDefault()

    if(typeof(mobileApp) !== 'undefined'){
        options.display = "touch"; //also tried iframe, popup
        FB.ui(options,
        function() {
            console.log('shared');
            })
        }
    } 
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I was able to find a workaround to this issue by overloading the following query string with a quote - which is the text you want to quote and an image (url). The only down fall was that I could not add a hashtag to my post but all in all it worked!

        var u = encodeURI(options.picture);
        var q = encodeURI(options.quote);
        window.location.href = "https://www.facebook.com/sharer/sharer.php?u=" + u + `&quote=${q}&display=popup&ref=plugin&src=like&kid_directed_site=0&app_id=YOUR_APP_ID`
about 4 years 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 vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda