4
Methods & Options
You can customize the plugin by passing configurations

1. Set Values

To set configuration through javascript, use set method.
1
SocialInviter.set({
2
modal: false,
3
header: false,
4
style: {
5
'font-family': 'Arial'
6
}
7
});
Copied!

2. Show plugin

To show plugin through custom javascript code, use show method.
1
SocialInviter.show();
Copied!

3. Hide plugin

To hide plugin
1
SocialInviter.hide();
Copied!

4. Inline plugin

To show the plugin on the page inline (not in a modal window), use a div that should have a class socialinviter and use set method.
1
<div style="height:500px">
2
<div class="socialinviter"></div>
3
</div>
Copied!
1
SocialInviter.set({
2
modal: false,
3
header: false
4
});
Copied!

5. Add Stage/Dev URL for your testing

To add a secondary authentication URL without removing the primary authentication URL, use authUrl . This will be helpful when you are locally doing debugging or testing the product in stage/testing servers.
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
modal: false,
7
header: false
8
});
Copied!

6. Open service

To open the import service for a particular service, use auth method.
1
SocialInviter.auth('google');
Copied!

7. Go to a screen

To go a specific screen
1
SocialInviter.goToScreen('thankyou');
Copied!

8. Show loading

To show loading, pass the text
1
SocialInviter.showLoading('Loading...');
Copied!

9. Hide loading

To hide loading
1
SocialInviter.hideLoading();
Copied!

10. Get profile

To get logged in user profile
1
SocialInviter.getProfile();
Copied!

11. Get active service

To get the currently selected service
1
SocialInviter.getService();
Copied!

12. Get all contacts

To get all imported contacts
1
SocialInviter.getAllContacts();
Copied!

13. Get all selected contacts

To get all selected contacts
1
SocialInviter.getAllSelected();
Copied!
To get all selected contacts and the manually entered contacts
1
SocialInviter.getAllSelectedRecipients();
Copied!