<!-- Social Login will be embedded into the following element --> <div id="social_login_demo"></div>
<script type="text/javascript">
/* Replace the subdomain with your own subdomain from a Site in your OneAll account */
var oneall_subdomain = 'slideheroes';
/* Asynchronously load the library */
var oa = document.createElement('script');
oa.type = 'text/javascript'; oa.async = true;
oa.src = '//' + oneall_subdomain + '.api.oneall.com/socialize/library.js'
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(oa, s)
/* This is an event */
var my_on_login_redirect = function(args) {
alert("You have logged in with " + args.provider.name);
/* As this is a demo return false to cancel the redirection to the callback_uri */
return false;
}
/* Initialise the asynchronous queue */
var _oneall = _oneall || [];
/* Social Login Example */
_oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'twitter']]);
_oneall.push(['social_login', 'set_grid_sizes', [3,1]]);
_oneall.push(['social_login', 'set_event', 'on_login_redirect', 'https://www.slideheroes.com/dashboard' ]);
_oneall.push(['social_login', 'do_render_ui', 'social_login_demo']);
</script>
<code class="tve_js_placeholder">
Please sign in to your OneAll account to ask a new question or to contribute to the discussions.
Please click on the link below to connect to the forum with your OneAll account.
Answers
the event that you are using prevents the redirection:
/* This is an event */ var my_on_login_redirect = function(args) { alert("You have logged in with " + args.provider.name); /* As this is a demo return false to cancel the redirection to the callback_uri */ return false; }
You also do not need to include the library.js as it's already included by WordPress.
Could you please replace your code by the following code and try again?
<a href="#" id="social_login_link">Login</a> var _oneall = _oneall || []; _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'twitter']]); _oneall.push(['social_login', 'set_callback_uri', 'https://www.slideheroes.com/dashboard']); _oneall.push(['social_login', 'attach_onclick_popup_ui', 'social_login_link']);
This should open a modal box when you click on the Login link
That is fantastic. Looks to be working.
One small question. There is a strange grey box that appears. Anyway to get rid of this?
screencast.com/t/wEDiG9Yr
Here is the code I am using:
<!-- Social Login will be embedded into the following element --> <div id="social_login_demo"></div> <script type="text/javascript"> /* Replace the subdomain with your own subdomain from a Site in your OneAll account */ var oneall_subdomain = 'slideheroes'; /* Initialise the asynchronous queue */ var _oneall = _oneall || []; /* Social Login Example */ _oneall.push(['social_login', 'set_providers', ['facebook', 'google', 'twitter']]); _oneall.push(['social_login', 'set_grid_sizes', [3,1]]); _oneall.push(['social_login', 'set_callback_uri', 'https://www.slideheroes.com/dashboard' ]); _oneall.push(['social_login', 'do_render_ui', 'social_login_demo']); </script>
where exactly can I see the box? Could you post a link and a description where I can see it?
Sorry, the link to a screenshot of the issue is:
http://screencast.com/t/wEDiG9Yr
That would be better.
https://slideheroes.com/test-social-login-modal/