谷歌加自定义共享按钮回调

Google plus custom share button callback

本文关键字:按钮 回调 共享 自定义 谷歌      更新时间:2023-09-26

当用户向自定义共享按钮共享内容时,是否有方法添加回调?

目前,我在弹出窗口中打开一个共享对话框:

<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();
    });

在文档中:https://developers.google.com/+/web/share/他们说,当使用他们的jsapi时,我们可以指定带数据的回调。找不到使用自定义共享链接的方法。

似乎没有办法做到这一点。这个确切的功能请求存在一个悬而未决的问题。

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

考虑主演和支持它,但它已经上映三年了。谷歌似乎并没有努力实现它。