Gplus +1 Button Callback - Callback does not work as expected when +1 fail
I implemented a +1 button on a page.

I create the +1 using Javasccript:

    function create_gplus_botton() {
        
            if (jQuery('.googleplus-placeholder').length > 0) {
                var po = document.createElement('g:plusone');
                po.setAttribute('annotation', 'none');
                po.setAttribute('callback', 'gplus_callbackposted');
                var s = jQuery('.googleplus-placeholder').append(po);
                var po = document.createElement('script'); 
                po.type = 'text/javascript'; 
                po.async = true;
                po.src = 'https://apis.google.com/js/plusone.js';
                var s = document.getElementsByTagName('script')[0]; 
                s.parentNode.insertBefore(po, s);            
            }
    
        
    }

This function is triggered on the jQuery(document).ready:

    jQuery(document).ready(function(){
       ...
           //gplus
            create_gplus_botton();
       ...
    });


I also defined a callback that is triggered when I click the +1 button:

    function gplus_callbackposted(data) {
        alert(data.state);
    }

When I click the +1 button the data.state is "on" as expected, but if for some reason there is an error during the +1 process and the content is not "+1ed" my callback is not triggered  with state = "off" as I expect.

For example if I am on a local enviroment using a dummy domain like:
http://localhost.local the +1 button are unable to share the content in fact the +1 icon is showed as a red triangle, but the callback is triggered with data.status = on, so I am unable to understand if the content is really +1ed or not.

Do you have any clue?
Gplus +1 Button Callback - Callback does not work as expected when +1 fail
===

I implemented a +1 button on a page.

I create the +1 using Javasccript:

    function create_gplus_botton() {
        
            if (jQuery('.googleplus-placeholder').length > 0) {
                var po = document.createElement('g:plusone');
                po.setAttribute('annotation', 'none');
                po.setAttribute('callback', 'gplus_callbackposted');
                var s = jQuery('.googleplus-placeholder').append(po);
                var po = document.createElement('script'); 
                po.type = 'text/javascript'; 
                po.async = true;
                po.src = 'https://apis.google.com/js/plusone.js';
                var s = document.getElementsByTagName('script')[0]; 
                s.parentNode.insertBefore(po, s);            
            }
    
        
    }

This function is triggered on the jQuery(document).ready:

    jQuery(document).ready(function(){
       ...
           //gplus
            create_gplus_botton();
       ...
    });


I also defined a callback that is triggered when I click the +1 button:

    function gplus_callbackposted(data) {
        alert(data.state);
    }

When I click the +1 button the data.state is "on" as expected, but if for some reason there is an error during the +1 process and the content is not "+1ed" my callback is not triggered  with state = "off" as I expect.

For example if I am on a local enviroment using a dummy domain like:
http://localhost.local the +1 button are unable to share the content in fact the +1 icon is showed as a red triangle, but the callback is triggered with data.status = on, so I am unable to understand if the content is really +1ed or not.

Do you have any clue?