LinkedIn和Google Plus分享成功的回调 [英] LinkedIn and google plus share successful callback

查看:74
本文介绍了LinkedIn和Google Plus分享成功的回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与Facebook和Twitter成功共享后,我得到了回调. Linkedin和Google Plus可以使用吗?

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

Google Plus分享:

Google Plus Share :

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

Linkedin分享:

Linkedin Share :

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

推荐答案

尝试 Linkedin共享小部件

设置成功成功时触发的回调函数

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>

ontracklinkedin功能

on tracklinkedin function

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

Google Plus

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
    }}

这篇关于LinkedIn和Google Plus分享成功的回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆