LinkedIn and google plus share successful callback

a 夏天 提交于 2019-12-24 03:08:38

问题


I got callback after share successfully with Facebook and Twitter. Is it possible with Linkedin and Google Plus?

Google Plus Share :

href="https://plus.google.com/share?url={URL}"

Linkedin Share :

href="http://www.linkedin.com/shareArticle?mini=true&url={articleUrl}"

回答1:


Try Linkedin Share widget

set callback function on onsuccess that fire when share successfully

<script type="IN/Share+init" data-counter="top" data-url="your share Url" data-onsuccess="tracklinkedin"></script>

on tracklinkedin function

function tracklinkedin(reponse) {
   console.log('linkedin' + reponse);
   //do here
}

Google Plus

<div class="g-plus" data-action="share" data-annotation="top" data-href="your url"    data-callback="trackgoogle" ></div>

function trackgoogle(reponse) {
     console.log('Google Plus' + reponse.state);
    if(reponse.state=='on')   
    {
      $SS.TrackCount('googleplus')
      //to do
    }}


来源:https://stackoverflow.com/questions/20320442/linkedin-and-google-plus-share-successful-callback

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!