Search code examples
emailcustomizationsharegigya

Gigya using customized UI for email (Not using ShareBar)


I'm thinking of a way to implement share email function using gigya, and my website has very specific need for share bar(own template and css, animation, etc), so using buttonImages as below can not resolve my problem.

var params ={
    userAction:ua,
    shareButtons:'share,facebook,twitter,email', // list of providers
    containerID: 'divButtons',
    buttonImages:{buttonLeftImgUp:'Button_Left.png',buttonCenterBGImgUp:'Button_Middle.png',buttonRightImgUp:'Button_Right.png'}
    };

I've successfully used another supported API, gigya.socialize.postBookmark(params), to implement this.

var params = 
{
	url: "http://www.gigya.com/",
    provider:'tumblr',
    facebookDialogType: 'share',
    title: "Gigya"
};
gigya.socialize.postBookmark(params);

Unfortunately, this function does not support email as a provider, which means I can not add email into my own share bar. Does anyone know how to implement email share, while using my own template(not using customized image)?

Thanks a lot!


Solution

  • I am one of the engineers at Gigya. So that you can better understand what is happening under the hood, clicking on the email share button from the share bar UI ultimately boils down to a call that looks like this: document.location.href = "mailto:?to=&subject=" + "Your email subject" + "&body=" + "The body of the email";

    So really you can just write your own event handler to call a document.location.href like mentioned above with your own subject and body. Alternatively, you can just set the href of an tag to something equivalent.

    Hope that helps,

    -CodeMonkeyG