4️Methods & Options
You can customize the plugin by passing configurations
1. Set Values
To set configuration through javascript, use set
method.
SocialInviter.set({
modal: false,
header: false,
style: {
'font-family': 'Arial'
}
});
2. Show plugin
To show plugin through custom javascript code, use show
method.
SocialInviter.show();
3. Hide plugin
To hide plugin
SocialInviter.hide();
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.
<div style="height:500px">
<div class="socialinviter"></div>
</div>
SocialInviter.set({
modal: false,
header: false
});
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.
SocialInviter.set({
authUrl: {
development: 'http://127.0.0.1:5501/oauth.html',
stage: 'https://stage.yourdomain.com/oauth.html',
},
modal: false,
header: false
});
6. Open service
To open the import service for a particular service, use auth
method.
SocialInviter.auth('google');
7. Go to a screen
To go a specific screen
SocialInviter.goToScreen('thankyou');
8. Show loading
To show loading, pass the text
SocialInviter.showLoading('Loading...');
9. Hide loading
To hide loading
SocialInviter.hideLoading();
10. Get profile
To get logged in user profile
SocialInviter.getProfile();
11. Get active service
To get the currently selected service
SocialInviter.getService();
12. Get all contacts
To get all imported contacts
SocialInviter.getAllContacts();
13. Get all selected contacts
To get all selected contacts
SocialInviter.getAllSelected();
To get all selected contacts and the manually entered contacts
SocialInviter.getAllSelectedRecipients();
Last updated
Was this helpful?