Google plus interactive callback

I have included Google+ on my site, users can register on this site, and when they add something through interactive Google+ messages, they are assigned 1 point, so I need a callback from the interactive page, otherwise I don’t know if users cancel the exchange. Do you know how to get callback from interactive mail? The code is as follows:

<button id="gpShareBtn" class="g-interactivepost" 
data-contenturl="<?php echo _PATHWEB; ?>" 
data-clientid="<?php echo _GPCLIENTID ?>" 
data-cookiepolicy="single_host_origin" 
data-prefilltext="text" 
data-calltoactionlabel="TRY_IT" 
data-calltoactionurl="<?php echo _PATHWEB; ?>" 
data-gapiscan="true" 
data-onload="true" 
data-gapiattached="true">gpshare</button>

Thank you in advance

+4
source share
2 answers

There is currently no callback for interactive messaging. There is an open function request for this, which you can show in order to show your interest and receive an update:

https://code.google.com/p/google-plus-platform/issues/detail?id=521

+3

, JSON onshare ( HTML), render SDK JavaScript :

  var shareOptions = {
    contenturl:         "http://example.com",
    clientid:           "xxx.apps.googleusercontent.com",
    cookiepolicy:       "single_host_origin",
    calltoactionlabel:  "GO",
    calltoactionurl:    "http://example.com/go",
    onshare: function(response){
      // These are the objects returned by the platform
      // When the sharing starts...
      // Object {status: "started"}
      // When sharing ends...
      // Object {action: "shared", post_id: "xxx", status: "completed"} 
    }
  };

  gapi.interactivepost.render('some_div_id', shareOptions);

, HTML.

+8

All Articles