Gigya Job Openings

Invite (deprecated) JS

Skip to end of metadata
Go to start of metadata


This object is deprecated! 


This object is used to define and configure an optional "Invite" dialog that can be added to the login / adding connection process.

The "Invite" dialog is a proposition to the user to send an invitation to his friends on Facebook.

The socialize.login, socialize.addConnection, socialize.showLoginUI and socialize.showConnectUI methods include an optional "invite" parameter that accepts the Invite object. If the "invite" parameter is specified then the "Invite" dialog will be displayed whenever a user logs-in/connects to Facebook.


Data Members

Field NameTypeDescription
titlestringThe title of the "Invite" dialog. The title is presented on the "Invite" dialog as the proposition to the user to invite his friends. The title is not part of the invitation itself.

The invitation text. The text may include links.

Note: To support IE6, the total length of the text, including links, should not exceed 1500 characters.

actionURLURLThis URL is essentially the heart of the invitation, since typically the purpose of the invitation is to bring users' friends to a certain web page. Practically, when a friend who received an invitation clicks on the invitation acceptance button, he will be redirected to this URL.
repeatFreqintOptional. The interval in days for repeating the display of the "Invite" dialog, as long as the user has never sent an invitation. The default is 3.
repeatCapintOptional. The maximum number of times to show the "Invite" dialog, as long as the user has never sent an invitation. The default is 1.


Code Sample


// Defining the Invite object:
var invite =
    title: "Invite your friends to see HOME movie",
    text: "You are invited to watch the <a href=''>HOME movie.</a><br />About the movie: We are living in exceptional times. Scientists tell us that we have 10 years to change the way we live...",
    actionURL: ""

var params =
    invite: invite,    // set the invite parameter with the invite object defined above
    provider: "facebook"    // we would like to add connection to Facebook




  • This sample is not meant to be fully functional code. For brevity's sake, only the code required for demonstrating the API call itself is presented.
  • To run the code on your own domain, add your Gigya API key to the gigya.js URL. A Gigya API key can be obtained on the Site Dashboard page on Gigya's website. Please make sure that the domain from which you are loading the page is the same domain name that you used for generating the API key.
  • In some cases it is necessary to connect/login the user to a provider ? prior to calling the API method. You can learn more in the Social Login guide.

  • No labels