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

190
Vistas
How to implement Twitter share button with success tweeted callback in react

componentDidMount() {

window.twttr = (function (d, s, id) {

var js,

fjs = d.getElementsByTagName(s)[0],

t = window.twttr || {};

if (d.getElementById(id)) return t;

js = d.createElement(s);

js.id = id;

js.src = 'https://platform.twitter.com/widgets.js';

fjs.parentNode.insertBefore(js, fjs);

t._e = [];

t.ready = function (f) {

t._e.push(f);

};

return t;

})(document, 'script', 'twitter-wjs');

twttr.widgets.load()

}

shareOnTwitter = () => { var tweetUrl = 'https://twitter.com/intent/tweet?url=' + window.location.href; var x = screen.width / 2 - 700 / 2; var y = screen.height / 2 - 450 / 2; var child = window.open(tweetUrl, "popupWindow", "width=600, height=400,left=" + x + ",top=" + y); child.focus(); twttr.ready(function (twttr) { twttr.events.bind('tweet', function () { alert('Tweeted!'); }); }); };

<a onClick={this.shareOnTwitter} // class="twitter-share-button" >Tweet</a>

I have add twitter widgets on componentDidMount but i don't understand how i check user tweeted or not.

about 4 years ago · Juan Pablo Isaza
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