0

我正在尝试更改 Gigya 共享栏上 googleplus-share 按钮的外观。我可以更改其他按钮(Facebook、Twitter 等)的外观,但 Google-plus 按钮会忽略 Gigya 指定的 iconImgUp 参数并恢复为默认外观。

我正在使用以下参数设置:

gigya.socialize.showShareBarUI({
    containerID : 'share-bar',
    shareButtons : [{provider: 'Facebook', enableCount: 'false', iconOnly:'true', iconImgUp:'images/facebook.jpg', iconImgOver:'images/facebookdown.jpg'},
    {provider: 'googleplus-share', enableCount: 'false', iconOnly:'true', iconImgUp: 'images/facebook.jpg'},
    {provider: 'Twitter', enableCount: 'true'},
    {provider: 'Share', enableCount: 'true'},
    {provider: 'Email'},
    {provider: 'Print'}],
    userAction: act,
    operationMode: 'multiSelect',
    grayedOutScreenOpacity: 20,
    onShareButtonClicked: function (eventObj) {
    }
});

请注意,我为 facebook 和 google-plus 使用相同的图像进行测试,但这就是显示的内容:

在此处输入图像描述

有任何想法吗?

4

3 回答 3

0

由于 GooglePlus 分享按钮是由 Google 托管的 iframe 按钮,因此无法进行风格化。

于 2014-08-19T18:42:40.247 回答
0

可选参数 iconImgUp、iconImgOver、iconOnly 和工具提示不适用于保留名称(“本机”)共享按钮:... 'googleplus-share' ...

资源

于 2014-08-19T18:43:00.093 回答
0

这在下面对我有用

var showShareBarUI_params = {
  containerID: 'componentDiv',
  shareButtons: [{ // General Share Button
    provider: 'share',
    tooltip: 'Share Button',
    iconImgUp: '/Images/icons_share.png'
  }, { // Facebook
    provider: 'facebook',
    tooltip: 'Recommend this on Facebook',
    iconImgUp: '/Images/icons_fb.png'
  }, { // Twitter
    provider: 'twitter',
    tooltip: 'Recommend this on Twitter',
    iconImgUp: '/Images/icons_twitter.png'
  }, { // Pinterest
    provider: 'pinterest',
    tooltip: 'Recommend this on Pinterest',
    iconImgUp: '/Images/icons_pin.png'
  }, { // Google+
    provider: 'googleplus',
    tooltip: 'Recommend this on Google',
    iconImgUp: '/Images/icons_gplus.png'
  }, ],
  showCounts: 'none',
  iconsOnly: 'true',
  moreDisabledProviders: 'Pinterest, hyves, delicious, digg, friendfeed, googlebookmarks, messenger, stumbleupon, skyrock, qq, sina, kaixin, renren, vznet, vkontakte, spiceworks, viadeo, nkpl, xing, tuenti, technorati, plaxo, reddit, formspring, tumblr, faves, newsvine, fark, mixx, bit.ly, hatena, misterwong, ask, amazon, gmail, baidu, box.net, whatsapp, netlog, evernote, aolmail, currenttv, yardbarker, blinklist, diigo, dropjack, segnalo, linkagogo, kaboodle, skimbit, facebook, twitter, googleplus, linkedin, mixi, odnoklassniki, douban',
  userAction: act,
  googleplusUserAction: gpAct,
  twitterUserAction: twAct
}

于 2015-02-24T21:40:47.603 回答