Comment on page
6
Callbacks
This callback will be executed after the contacts are imported
1
SocialInviter.set({
2
authUrl: {
3
development: 'http://127.0.0.1:5501/oauth.html',
4
stage: 'https://stage.yourdomain.com/oauth.html',
5
},
6
style: {
7
'font-family': 'Arial'
8
},
9
callbacks: {
10
imported: (service, profile, addressbook) => {
11
console.log('service', service);
12
console.log('addressbook', addressbook);
13
}
14
}
15
});
This callback will be executed once a user clicks on the "Proceed" button on the contacts screen
1
SocialInviter.set({
2
authUrl: {
3
development: 'http://127.0.0.1:5501/oauth.html',
4
stage: 'https://stage.yourdomain.com/oauth.html',
5
},
6
style: {
7
'font-family': 'Arial'
8
},
9
callbacks: {
10
proceed: (service, profile, addressbook, selected) => {
11
console.log('service', service);
12
console.log('addressbook', addressbook);
13
}
14
}
15
});
This callback will be executed after the user clicks the "Send" button on the mail screen
1
SocialInviter.set({
2
authUrl: {
3
development: 'http://127.0.0.1:5501/oauth.html',
4
stage: 'https://stage.yourdomain.com/oauth.html',
5
},
6
style: {
7
'font-family': 'Arial'
8
},
9
callbacks: {
10
send: (service, profile, addressbook, selected, successObjects, errorObjects) => {
11
// Your logic here
12
}
13
}
14
});
1
SocialInviter.set({
2
authUrl: {
3
development: 'http://127.0.0.1:5501/oauth.html',
4
stage: 'https://stage.yourdomain.com/oauth.html',
5
},
6
style: {
7
'font-family': 'Arial'
8
},
9
callbacks: {
10
button: (product, service, e, profile, addressbook, selected) => {
11
// Your logic here
12
}
13
}
14
});
You can use
imported
, proceed
, send
callback methods to receive the callback execution.1
SocialInviter.set({
2
authUrl: {
3
development: 'http://127.0.0.1:5501/oauth.html',
4
stage: 'https://stage.yourdomain.com/oauth.html',
5
},
6
style: {
7
'font-family': 'Arial'
8
},
9
callbacks: {
10
imported: (service, profile, addressbook) => {
11
console.log('service', service);
12
console.log('addressbook', addressbook);
13
},
14
proceed: (service, profile, addressbook, selected) => {
15
console.log('service', service);
16
console.log('addressbook', addressbook);
17
},
18
send: (service, profile, addressbook, selected, successObjects, errorObjects) => {
19
console.log('service', service);
20
},
21
button: (product, service, e, profile, addressbook, selected) => {
22
// Your logic here
23
}
24
}
25
});
Last modified 3mo ago