Is there a way to add a callback when a user shares something with custom sharing buttons?
I am currently opening a sharing dialog in a popup window:
<a data-height="600" data-title="Google+" class="popup" href="https://plus.google.com/share?url=MY_URL">Share</a> $('.popup').click(function(event) { var width = 575, height = $(this).data('height'), left = ($(window).width() - width) / 2, top = ($(window).height() - height) / 2, url = this.href, opts = 'status=1' + ',width=' + width + ',height=' + height + ',top=' + top + ',left=' + left; window.open(url, $(this).data('title'), opts); event.preventDefault(); });
In the documentation: https://developers.google.com/+/web/share/ they say that we can specify a callback using data-onendinteraction when using their js api. Unable to find a way to do this using a custom sharing link.
source share