2013-08-20 27 views
2

我使用Google Interactive post讓登錄用戶邀請外部用戶訪問該網站。只有當用戶選擇在Google plus上發佈他的某個聯繫人時,我纔想在我的網站上註冊該邀請。在Google Interactive上處理Post事件

有沒有辦法處理事後的事件,並知道用戶是否已經發布和相應調用處理程序?

以下是我今天所稱的方法。

var options = { 
    contenturl: myurl, 
    clientid: googleappid, 
    cookiepolicy: "single_host_origin", 
    prefilltext: text, 
    calltoactionlabel: "START", 
    calltoactionurl: somethingstring, 
    recipients: connectionid, 
    onClick: doSomethingOnClick(), 
}; 
gapi.interactivepost.render('submit', options); 

就像onClick是否有像支持onPost一樣的事件?

回答

0

onshare: function(response){ 
     console.log('callback done'); 
     // 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"} 
    } 

它無證,但我只是測試它和它的工作。