Google button callback plus user share

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.

+6
source share
1 answer

There seems to be no way to do this. There is an open question with this exact function request.

https://code.google.com/p/google-plus-platform/issues/detail?id=232

Take the lead and supporting it, but it has already been open for three years. It seems that Google is not trying to implement it.

-1
source

Source: https://habr.com/ru/post/975239/


All Articles