<script type="text/javascript">
/* Replace #your_subdomain# by the subdomain of a Site in your OneAll account */
var oneall_subdomain = '<?php echo $subdomain; ?>';
/* The library is loaded asynchronously */
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);
</script>
<script type="text/javascript">
pathArray = location.href.split( '/' );
protocol = pathArray[0];
host = pathArray[2];
url = protocol + '//' + host + '/customer/account/login/?oneall=login';
/* Embeds the buttons into the container oa_social_login_container */
var _oneall = _oneall || [];
_oneall.push(['social_login', 'set_providers', [<?php echo $providers; ?>]]);
_oneall.push(['social_login', 'set_callback_uri', (url)]);
_oneall.push(['social_login', 'do_render_ui', 'flyout-signIn-type']);
</script>
<div class="flyout-signIn-type"></div>
Array (
[oneall] => login
[oa_action] => social_login
[oa_social_login_token] => Token form : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[connection_token] => (Same Token)
[identity_vault_key] => (Nothing)
)
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
Try adding: index.php in the callback URI (before the /customer).
You build the callback URL in your JS code:
url = protocol + '//' + host + '/customer/account/login/?oneall=login';
Hope this helps.
url = protocol + '//' + host + '/index.php/customer/account/login/?oneall=login';
I'm doing this wrong ?
It looks correct.
We use:
_oneall.push(['social_login', 'set_callback_uri', (window.location.href + ((window.location.href.split('?')[1] ? '&' : '?') + 'oneall=login'))]);
When the HTML is rendered, what is the JS code inserted?
(look for something like: )
var plugin ; plugin = new oa_social_login( { "id":25546, "parent_uri":"http:\/\/[my_correct_site_url]\/", "callback_uri":"http:\/\/[my_correct_site_url]\/customer\/account\/login\/?oneall=login", "css_theme_uri":null, "use_modal_dialog":false, "force_reauth":false, "disable_popups":null, "demo":false, "pluginkey":"social_login", "linked_providers":[], "grid_size_x":99, "grid_size_y":99, "providers":["facebook","google"], "providers_scope":null }); plugin.setup_login_frame("providers");
In my url i don't have 'www' only my local website name, and index.php is not here ... I tried to add it manually on my page and it doesn't work either ...
The JS code:
var plugin ; plugin = new oa_social_login( { "id":25546,
is automatically added by this code:<script type="text/javascript"> pathArray = location.href.split( '/' ); protocol = pathArray[0]; host = pathArray[2]; url = protocol + '//' + host + '/customer/account/login/?oneall=login'; /* Embeds the buttons into the container oa_social_login_container */ var _oneall = _oneall || []; _oneall.push(['social_login', 'set_providers', [<?php echo $providers; ?>]]); _oneall.push(['social_login', 'set_callback_uri', (url)]); _oneall.push(['social_login', 'do_render_ui', 'flyout-signIn-type']); </script>
So, you need to place the correct parameters in the _oneall.push calls.
The callback URI is incorrect. You need the index.php there (and the correct host, as you say).
We don't know how you build your button, so we can't really tell you where it is supposed to go.
Feel free to send an email if you want more details on this, with private information.
Hope this helps.
Also try changing
<div class="flyout-signIn-type"></div>
to<div id="flyout-signIn-type"></div>
Hope this helps.