social networking - Google plus share link response issue -
i using below code share link on google plus.
<html> <head> <script type="text/javascript"> window.onplusstart = function(x) { console.log('ops', x) } window.onplusdone = function(x) { console.log('opd', x) } </script> </head> <body> <div class="g-plus" data-action="share" data-href="http://test.com" data-onstartinteraction="onplusstart" data-onendinteraction="onplusdone"> </div> <script type="text/javascript"> (function() { var po = document.createelement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getelementsbytagname('script')[0]; s.parentnode.insertbefore(po, s); })(); </script> </body> </html>
issue : right getting response 4 times in console log onplusdone @ time of share(response 1 : before login window, response 2 : after close login window, response 3 : after close login window, response 4 : after share successfully).
but need response 1 after share.
Comments
Post a Comment