如何更改Gigya共享栏上googleplus-share按钮的外观?

时间:2014-08-19 14:21:21

标签: google-plus gigya

我正在尝试更改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使用相同的图片进行测试,但这就是显示的内容:

enter image description here

有什么想法吗?

3 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

  

可选参数iconImgUp,iconImgOver,iconOnly和tooltip将无法使用保留名称(“原生”)共享按钮:...'googleplus-share'...

Source

答案 2 :(得分: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
}