I'm looking for a way to subscribe to the plus one button.
According to the documentation here: https://developers.google.com/+/plugins/+1button/#plusonetag-parameters I could add a callback attribute to the tag, but in my case I'm not allowed to interfere. I'm building a tool ontop of the site, an embedded JS triggered on document ready. I want to add the callback live, and it mustn't interfere the original callback if one was declared.
I don't have this problem with Facebook or Twitter (like and tweet, for instance). In these cases there's the FB and twttr global variables, registered like so once they are available:
FB.Event.subscribe("edge.create", function(e) {
console.log(e);
})
or twitter's twttr.events.bind ...
Am I missing anything or is Google choosing a very awkward way to do things? What's their interest in this method and what can be done around it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With