6
Callbacks
This callback will be executed after the contacts are imported
SocialInviter.set({
authUrl: {
development: 'http://127.0.0.1:5501/oauth.html',
stage: 'https://stage.yourdomain.com/oauth.html',
},
style: {
'font-family': 'Arial'
},
callbacks: {
imported: (service, profile, addressbook) => {
console.log('service', service);
console.log('addressbook', addressbook);
}
}
});
This callback will be executed once a user clicks on the "Proceed" button on the contacts screen
SocialInviter.set({
authUrl: {
development: 'http://127.0.0.1:5501/oauth.html',
stage: 'https://stage.yourdomain.com/oauth.html',
},
style: {
'font-family': 'Arial'
},
callbacks: {
proceed: (service, profile, addressbook, selected) => {
console.log('service', service);
console.log('addressbook', addressbook);
}
}
});
This callback will be executed after the user clicks the "Send" button on the mail screen
SocialInviter.set({
authUrl: {
development: 'http://127.0.0.1:5501/oauth.html',
stage: 'https://stage.yourdomain.com/oauth.html',
},
style: {
'font-family': 'Arial'
},
callbacks: {
send: (service, profile, addressbook, selected, successObjects, errorObjects) => {
console.log('service', service);
}
}
});
You can use
imported
, proceed
, send
callback methods to receive the callback execution.SocialInviter.set({
authUrl: {
development: 'http://127.0.0.1:5501/oauth.html',
stage: 'https://stage.yourdomain.com/oauth.html',
},
style: {
'font-family': 'Arial'
},
callbacks: {
imported: (service, profile, addressbook) => {
console.log('service', service);
console.log('addressbook', addressbook);
},
proceed: (service, profile, addressbook, selected) => {
console.log('service', service);
console.log('addressbook', addressbook);
},
send: (service, profile, addressbook, selected, successObjects, errorObjects) => {
console.log('service', service);
}
}
});
Last modified 1yr ago